projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef76230
)
Applied patch by Itagaki Takahiro to fix incorrect status calculation in
author
Michael Meskes
Thu, 14 Oct 2010 15:49:01 +0000
(17:49 +0200)
committer
Michael Meskes
Thu, 14 Oct 2010 15:49:01 +0000
(17:49 +0200)
ecpglib. Instead of parsing the statement just as ask the database server.
src/interfaces/ecpg/ecpglib/misc.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/ecpglib/misc.c
b/src/interfaces/ecpg/ecpglib/misc.c
index 9a5dca763bd5eb4d408dbbe4fbad491de5ac1cc3..5c1696ad8286d8c3839bc9d3d8e83d4ae561b1ff 100644
(file)
--- a/
src/interfaces/ecpg/ecpglib/misc.c
+++ b/
src/interfaces/ecpg/ecpglib/misc.c
@@
-219,10
+219,7
@@
ECPGtrans(int lineno, const char *connection_name, const char *transaction)
return FALSE;
PQclear(res);
- if (strncmp(transaction, "commit", 6) == 0 || strncmp(transaction, "rollback", 8) == 0)
- con->committed = true;
- else
- con->committed = false;
+ con->committed = (PQtransactionStatus(con->connection) == PQTRANS_IDLE);
}
return true;