Author: wyoung
Date: Mon Jun 15 18:11:41 2009
New Revision: 2524
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2524&view=rev
Log:
Fixed a bug that would cause a crash in Connection::set_option() if the
option was unable to be set correctly, due to trying to access info
about the option, which had been deleted on detecting the error. Patch
by Kevin Regan <[email protected]>
Modified:
trunk/lib/connection.cpp
Modified: trunk/lib/connection.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/connection.cpp?rev=2524&r1=2523&r2=2524&view=diff
==============================================================================
--- trunk/lib/connection.cpp (original)
+++ trunk/lib/connection.cpp Mon Jun 15 18:11:41 2009
@@ -314,13 +314,14 @@
bool
Connection::set_option(Option* o)
{
+ const std::type_info& oti = typeid(*o);
error_message_ = driver_->set_option(o);
if (error_message_.empty()) {
return true;
}
else {
if (throw_exceptions()) {
- throw BadOption(error_message_, typeid(*o));
+ throw BadOption(error_message_, oti);
}
return false;
}
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits