diff options
author | Michael Meskes <meskes@postgresql.org> | 2009-09-03 09:09:01 +0000 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2009-09-03 09:09:01 +0000 |
commit | fe35c8e145e1c970dcae1f7df840762a753f6ee2 (patch) | |
tree | 276b0fbe4a48b55384afef12c9121f4de4417dc9 /src | |
parent | 49d960c4d9df2ce40dab1c025ca6a946d5328e00 (diff) | |
download | postgresql-fe35c8e145e1c970dcae1f7df840762a753f6ee2.tar.gz postgresql-fe35c8e145e1c970dcae1f7df840762a753f6ee2.zip |
Do not set connection values if no connection is open.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/misc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index 1a261252538..f70e3734ba5 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -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 #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)) return FALSE; PQclear(res); - } - if (strncmp(transaction, "commit", 6) == 0 || strncmp(transaction, "rollback", 8) == 0) - con->committed = true; - else - con->committed = false; + if (strncmp(transaction, "commit", 6) == 0 || strncmp(transaction, "rollback", 8) == 0) + con->committed = true; + else + con->committed = false; + } return true; } |