Date: Thursday, June 7, 2007 @ 17:38:55
Author: marc
Path: /cvsroot/carob/carob/test
Modified: ConnectionSetup.cpp (1.23 -> 1.24)
Do not reuse the connection if left in transactional mode
---------------------+
ConnectionSetup.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
Index: carob/test/ConnectionSetup.cpp
diff -u carob/test/ConnectionSetup.cpp:1.23 carob/test/ConnectionSetup.cpp:1.24
--- carob/test/ConnectionSetup.cpp:1.23 Thu Jun 7 17:00:07 2007
+++ carob/test/ConnectionSetup.cpp Thu Jun 7 17:38:55 2007
@@ -71,7 +71,8 @@
if (reuseConnection)
{
if (lastConnection != NULL
- && ! lastConnection->isClosed())
+ && ! lastConnection->isClosed()
+ && lastConnection->getAutoCommit())
{
logInfo(fctName, L"re-using lastConnection");
connectionPtr = lastConnection;
@@ -80,8 +81,12 @@
// reuse failed: fallback to reconnect below
else if (lastConnection == NULL)
logWarn(fctName, L"failed to re-use lastConnection, was NULL");
- else
+ else if (lastConnection->isClosed())
logError(fctName, L"failed to re-use lastConnection, was closed");
+ else if (! lastConnection->getAutoCommit())
+ logError(fctName, L"failed to re-use lastConnection, was transactional");
+ else
+ logError(fctName, L"failed to re-use lastConnection, ConnectionSetup
BUG!");
}
std::vector<ControllerInfo> ctrls;
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits