From b67dd43bbdca2563ed29e84d37efc91b99f9a8bf Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 5 Jan 2017 21:02:54 +0000 Subject: Fix bug where prepared statement cache wasn't cleared on connection reset leading to random failure due to prepapred statements not existing --- libpqpp/pq-connection.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'libpqpp/pq-connection.cpp') 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); -- cgit v1.2.3