From 87006ad34dd349a7dcb5eee93eab4be214d2e875 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 28 Feb 2016 17:22:24 +0000 Subject: Actually, don't prepare statement upfront during construction as it might not be valid (e.g. uncreated temp tables) --- libpqpp/unittests/testpq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpqpp/unittests/testpq.cpp') diff --git a/libpqpp/unittests/testpq.cpp b/libpqpp/unittests/testpq.cpp index 088910d..1905192 100644 --- a/libpqpp/unittests/testpq.cpp +++ b/libpqpp/unittests/testpq.cpp @@ -271,7 +271,7 @@ BOOST_AUTO_TEST_CASE( statementReuse ) BOOST_REQUIRE_EQUAL(pqconn->preparedStatements.size(), 1); for (int y = 0; y < 4; y += 1) { auto m1 = ro->modify("INSERT INTO test(id) VALUES(?)"); - BOOST_REQUIRE_EQUAL(pqconn->preparedStatements.size(), 2); + BOOST_REQUIRE_EQUAL(pqconn->preparedStatements.size(), y == 0 ? 1 : 2); for (int x = 0; x < 4; x += 1) { m1->bindParamI(0, x); m1->execute(); -- cgit v1.2.3