Skip to content

Commit

Permalink
Fix mysql_options() recall after mysql_real_connect(), closes #71
Browse files Browse the repository at this point in the history
  • Loading branch information
Sannis committed Dec 7, 2010
1 parent caaf631 commit c1aec39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mysql_bindings_connection.cc
Expand Up @@ -222,7 +222,8 @@ bool MysqlConnection::RealConnect(const char* hostname,
// Save it state and repeat mysql_options after connect
// See issue #66
#if MYSQL_VERSION_ID >= 50013 && MYSQL_VERSION_ID < 50106
unsuccessful = mysql_options(_conn, MYSQL_OPT_RECONNECT, opt_reconnect);
unsuccessful = mysql_options(this->_conn, MYSQL_OPT_RECONNECT,
static_cast<const char*>(&this->opt_reconnect));
if (unsuccessful) {
this->connect_errno = mysql_errno(this->_conn);
this->connect_error = mysql_error(this->_conn);
Expand Down

0 comments on commit c1aec39

Please sign in to comment.