summaryrefslogtreecommitdiff
path: root/libpqpp/pq-connection.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-01-05 21:02:54 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2017-01-08 19:33:30 +0000
commit0dd5980eef6fee02ff9dc61bb4c20b6f3670a93c (patch)
treecc8031fc3d0c1c7c63234da3cdcdc54a2d05c46b /libpqpp/pq-connection.cpp
parentAdd PQ specific command options to control page size and the use of bulk -v- ... (diff)
downloadlibdbpp-postgresql-0dd5980eef6fee02ff9dc61bb4c20b6f3670a93c.tar.bz2
libdbpp-postgresql-0dd5980eef6fee02ff9dc61bb4c20b6f3670a93c.tar.xz
libdbpp-postgresql-0dd5980eef6fee02ff9dc61bb4c20b6f3670a93c.zip
Fix bug where prepared statement cache wasn't cleared on connection reset leading to random failure due to prepapred statements not existing
Diffstat (limited to 'libpqpp/pq-connection.cpp')
-rw-r--r--libpqpp/pq-connection.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libpqpp/pq-connection.cpp b/libpqpp/pq-connection.cpp
index 5b560a9..547923f 100644
--- a/libpqpp/pq-connection.cpp
+++ b/libpqpp/pq-connection.cpp
@@ -88,6 +88,7 @@ PQ::Connection::ping() const
if (inTx()) {
throw ConnectionError(conn);
}
+ preparedStatements.clear();
PQreset(conn);
if (PQstatus(conn) != CONNECTION_OK) {
throw ConnectionError(conn);