Author: wyoung
Date: Mon Mar  2 19:23:33 2009
New Revision: 2467

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2467&view=rev
Log:
Calling DBDriver::disconnect() twice no longer calls mysql_close()
twice.  Not sure this actually fixes anything, but someone reported a
double-delete crash in ~Connection() when using libmysqld...maybe this
is why.

Modified:
    trunk/lib/dbdriver.cpp

Modified: trunk/lib/dbdriver.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/dbdriver.cpp?rev=2467&r1=2466&r2=2467&view=diff
==============================================================================
--- trunk/lib/dbdriver.cpp (original)
+++ trunk/lib/dbdriver.cpp Mon Mar  2 19:23:33 2009
@@ -125,8 +125,10 @@
 void
 DBDriver::disconnect()
 {
-       mysql_close(&mysql_);
-       is_connected_ = false;
+       if (is_connected_) {
+               mysql_close(&mysql_);
+               is_connected_ = false;
+       }
 }
 
 


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to