mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Do not set connection values if no connection is open.
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.50 2009/08/07 10:51:20 meskes Exp $ */
|
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.51 2009/09/03 09:09:01 meskes Exp $ */
|
||||||
|
|
||||||
#define POSTGRES_ECPG_INTERNAL
|
#define POSTGRES_ECPG_INTERNAL
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
@ -202,12 +202,12 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
|
|||||||
if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL))
|
if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
PQclear(res);
|
PQclear(res);
|
||||||
}
|
|
||||||
|
|
||||||
if (strncmp(transaction, "commit", 6) == 0 || strncmp(transaction, "rollback", 8) == 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;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user