diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2016-08-19 15:46:27 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2016-08-19 15:46:27 +0000 |
commit | 31a8cf54c8a7913338480a0571feaf32143b5f64 (patch) | |
tree | 8847835f515af17d6c090300b138c31e1226731e /sql/slave.cc | |
parent | 7b89b9f5108c80f4f270da922d7e6c182a663719 (diff) | |
download | mariadb-git-31a8cf54c8a7913338480a0571feaf32143b5f64.tar.gz |
Revert "MDEV-9293 Connector/C integration"
This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 78f3ec90ff6..81597212c62 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3853,7 +3853,9 @@ static int try_to_reconnect(THD *thd, MYSQL *mysql, Master_info *mi, { mi->slave_running= MYSQL_SLAVE_RUN_NOT_CONNECT; thd->proc_info= messages[SLAVE_RECON_MSG_WAIT]; - thd->clear_active_mysql(); +#ifdef SIGNAL_WITH_VIO_CLOSE + thd->clear_active_vio(); +#endif end_server(mysql); if ((*retry_count)++) { @@ -4265,14 +4267,16 @@ err: if (mysql) { /* - Here we need to clear the active mysql before closing the + Here we need to clear the active VIO before closing the connection with the master. The reason is that THD::awake() might be called from terminate_slave_thread() because somebody - issued a STOP SLAVE. If that happends, the close_active_mysql() + issued a STOP SLAVE. If that happends, the close_active_vio() can be called in the middle of closing the VIO associated with the 'mysql' object, causing a crash. */ - thd->clear_active_mysql(); +#ifdef SIGNAL_WITH_VIO_CLOSE + thd->clear_active_vio(); +#endif mysql_close(mysql); mi->mysql=0; } @@ -6148,9 +6152,11 @@ void end_relay_log_info(Relay_log_info* rli) extern "C" void slave_io_thread_detach_vio() { +#ifdef SIGNAL_WITH_VIO_CLOSE THD *thd= current_thd; if (thd && thd->slave_thread) - thd->clear_active_mysql(); + thd->clear_active_vio(); +#endif } @@ -6309,7 +6315,9 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi, general_log_print(thd, COM_CONNECT_OUT, "%s@%s:%d", mi->user, mi->host, mi->port); } - thd->set_active_mysql(mysql); +#ifdef SIGNAL_WITH_VIO_CLOSE + thd->set_active_vio(mysql->net.vio); +#endif } mysql->reconnect= 1; DBUG_PRINT("exit",("slave_was_killed: %d", slave_was_killed)); |