Skip to content
Snippets Groups Projects
Commit 492059da authored by Michael Meskes's avatar Michael Meskes
Browse files

Move from strcmp to strncmp to be more tolerant for changes to the parser.

parent ef9ed9b6
No related branches found
No related tags found
No related merge requests found
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.42 2008/05/16 15:20:03 petere Exp $ */ /* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.43 2008/11/01 19:53:35 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL #define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h" #include "postgres_fe.h"
...@@ -204,7 +204,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction) ...@@ -204,7 +204,7 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
PQclear(res); PQclear(res);
} }
if (strcmp(transaction, "commit") == 0 || strcmp(transaction, "rollback") == 0) if (strncmp(transaction, "commit", 6) == 0 || strncmp(transaction, "rollback", 8) == 0)
con->committed = true; con->committed = true;
else else
con->committed = false; con->committed = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment