Hi,
while using soci 3.1.0 I've crashed at line 4 of souch code:
1 soci::session sql(connectionPool);
2 sql.reconnect();
3
4 soci::transaction tr(sql);
It seems that program crushes when using transactions on reconnected
sessions from connection pool. The cause of such behavior is that after
connection pool session reconnects there is no reinitialization of field
session::backEnd_.
I've check current master branch and it seems that there too may be the
same problem. Please check simple patch in attachement.
--
Krzysztof Bieleń
From: kbielen <[email protected]>
Date: Sat, 15 Sep 2012 10:32:08 +0200
Subject: BUGFIX: added forgotten reinitialization of field session::backEnd_
after reconnect of sessions using connection pool
---
src/core/session.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/core/session.cpp b/src/core/session.cpp
index 72bb9d9..da76f1b 100644
--- a/src/core/session.cpp
+++ b/src/core/session.cpp
@@ -205,6 +205,7 @@ void session::reconnect()
if (isFromPool_)
{
pool_->at(poolPosition_).reconnect();
+ backEnd_ = pool_->at(poolPosition_).get_backend();
}
else
{
--
1.7.9.5
------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users