projects
/
m6w6
/
ext-pq
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
| inline |
side by side
only rollback if transaction status indicates need of action
[m6w6/ext-pq]
/
src
/
php_pq.c
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);
}