Before dropping the statement, sync and discard the response from the server for...
authorHiroshi Inoue <inoue@tpf.co.jp>
Fri, 11 Nov 2011 22:52:01 +0000 (22:52 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Fri, 11 Nov 2011 22:52:01 +0000 (22:52 +0000)
statement.c
version.h

index 715cde2214ca50d1f3530acc0912158c0e8f3430..5caeefb9aaab52c0443cf78dc8effc9f4d45e6cc 100644 (file)
@@ -252,6 +252,14 @@ PGAPI_FreeStmt(HSTMT hstmt,
                SC_set_error(stmt, STMT_SEQUENCE_ERROR, "Statement is currently executing a transaction.", func);
                return SQL_ERROR; /* stmt may be executing a transaction */
            }
+           /*
+            *  Before dropping the statement, sync and discard
+            *  the response from the server for the pending
+            *  extended query.
+            */
+           if (NULL != conn->sock && stmt == conn->stmt_in_extquery)
+               QR_Destructor(SendSyncAndReceive(stmt, NULL, "finish the pending query"));
+           conn->stmt_in_extquery = NULL; /* for safety */
            /*
             * Free any cursors and discard any result info.
             * Don't detach the statement from the connection
index ac2030d4106073f4bc9ba89d4d283f8b4a2c357d..4cdcff80f127d9b300db3709f1c9799dde233922 100644 (file)
--- a/version.h
+++ b/version.h
@@ -12,6 +12,6 @@
 #define POSTGRESDRIVERVERSION      "09.00.0311"
 #define POSTGRES_RESOURCE_VERSION  "09.00.0311\0"
 #define PG_DRVFILE_VERSION     9,0,03,11
-#define PG_BUILD_VERSION       "201111110001"
+#define PG_BUILD_VERSION       "201111120001"
 
 #endif