diff options
author | Michael Meskes | 2009-09-03 09:09:01 +0000 |
---|---|---|
committer | Michael Meskes | 2009-09-03 09:09:01 +0000 |
commit | 67fab29ce6259a351173e5258242c7bbbdd4eb11 (patch) | |
tree | 2ad800722ea674a7c0f8c66d3b049dd6bc327d33 | |
parent | 53bc96a34210276ba31f4f383040088703d9239b (diff) |
Do not set connection values if no connection is open.
-rw-r--r-- | src/interfaces/ecpg/ecpglib/misc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index 7e27f27191..1257e95f4c 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -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; } |