apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r396812 - /apr/apr-util/branches/1.2.x/dbd/apr_dbd_pgsql.c
Date Tue, 25 Apr 2006 08:32:10 GMT
Author: bojan
Date: Tue Apr 25 01:31:58 2006
New Revision: 396812

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

Modified:
    apr/apr-util/branches/1.2.x/dbd/apr_dbd_pgsql.c

Modified: apr/apr-util/branches/1.2.x/dbd/apr_dbd_pgsql.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/branches/1.2.x/dbd/apr_dbd_pgsql.c?rev=396812&r1=396811&r2=396812&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/dbd/apr_dbd_pgsql.c (original)
+++ apr/apr-util/branches/1.2.x/dbd/apr_dbd_pgsql.c Tue Apr 25 01:31:58 2006
@@ -353,6 +353,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);
@@ -409,6 +414,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