projects
/
users
/
gsingh
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dfd308
)
Applied patch by Itagaki Takahiro to fix incorrect status calculation in
author
Michael Meskes
<
[email protected]
>
Thu, 14 Oct 2010 15:51:53 +0000
(17:51 +0200)
committer
Michael Meskes
<
[email protected]
>
Thu, 14 Oct 2010 15:51:53 +0000
(17:51 +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 d7a80d5f25bb298c3401a582ad451364fd1c54dd..daf01e6b9e0bc75f43b7b0f5f3bb4a55f3706b52 100644
(file)
--- a/
src/interfaces/ecpg/ecpglib/misc.c
+++ b/
src/interfaces/ecpg/ecpglib/misc.c
@@
-204,10
+204,7
@@
ECPGtrans(int lineno, const char *connection_name, const char *transaction)
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;
}