projects
/
m6w6
/
ext-pq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
a09c92a
)
only rollback if transaction status indicates need of action
author
Michael Wallner
<mike@php.net>
Wed, 6 Feb 2013 21:03:55 +0000
(22:03 +0100)
committer
Michael Wallner
<mike@php.net>
Wed, 6 Feb 2013 21:03:55 +0000
(22:03 +0100)
src/php_pq.c
patch
|
blob
|
history
diff --git
a/src/php_pq.c
b/src/php_pq.c
index e298d2b8ea5aad37d728233abdfba1cc7ebf1811..a465eeddb99db1f52d0b133162a9d1d3bf6709eb 100644
(file)
--- a/
src/php_pq.c
+++ b/
src/php_pq.c
@@
-1803,8
+1803,9
@@
static void php_pqconn_persistent_resource_factory_dtor(void *opaque, void *hand
{
PGresult *res;
+
/* clean up */
- if ((res = PQexec(handle,
"ROLLBACK; RESET ALL;
"))) {
+ if ((res = PQexec(handle,
PQtransactionStatus(handle) == PQTRANS_IDLE ? "RESET ALL" : "ROLLBACK; RESET ALL
"))) {
PHP_PQclear(res);
}