apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r396811 - /apr/apr-util/trunk/dbd/apr_dbd_pgsql.c
Date Tue, 25 Apr 2006 08:26:18 GMT
Author: bojan
Date: Tue Apr 25 01:26:09 2006
New Revision: 396811

URL: http://svn.apache.org/viewcvs?rev=396811&view=rev
Log:
Check bad transaction state in dbd_pgsql_pquery()/dbd_pgsql_pselect()

Modified:
    apr/apr-util/trunk/dbd/apr_dbd_pgsql.c

Modified: apr/apr-util/trunk/dbd/apr_dbd_pgsql.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/dbd/apr_dbd_pgsql.c?rev=396811&r1=396810&r2=396811&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_pgsql.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_pgsql.c Tue Apr 25 01:26:09 2006
@@ -358,6 +358,11 @@
 {
     int ret;
     PGresult *res;
+
+    if (sql->trans && sql->trans->errnum) {
+        return sql->trans->errnum;
+    }
+
     if (statement->prepared) {
         res = PQexecPrepared(sql->conn, statement->name, nargs, values, 0, 0,
                              0);
@@ -414,6 +419,11 @@
     PGresult *res;
     int rv;
     int ret = 0;
+
+    if (sql->trans && sql->trans->errnum) {
+        return sql->trans->errnum;
+    }
+
     if (seek) { /* synchronous query */
         if (statement->prepared) {
             res = PQexecPrepared(sql->conn, statement->name, nargs, values, 0,



Mime
View raw message