diff options
author | unknown <rburnett@build.mysql.com> | 2004-08-21 05:07:32 +0200 |
---|---|---|
committer | unknown <rburnett@build.mysql.com> | 2004-08-21 05:07:32 +0200 |
commit | 2eb954a27a6aa6bf0f4e9c480dc8a633649595f1 (patch) | |
tree | 03545c923a460000e555bccce9e6025220a90f58 /sql-common | |
parent | 7c46252467101d841de5b7774b4f5b6ddf858d9f (diff) | |
download | mariadb-git-2eb954a27a6aa6bf0f4e9c480dc8a633649595f1.tar.gz |
Bug #4629 Crash after SLAVE STOP, if the IO thread is in special state.
client.c:
Added call to clear_slave_vio inside end_server only when under Windows with repliaction
slave.cc:
Added clear_slave_vio function for clearing active vio on THD under Windows replication
sql/slave.cc:
Added clear_slave_vio function for clearing active vio on THD under Windows replication
sql-common/client.c:
Added call to clear_slave_vio inside end_server only when under Windows with repliaction
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 68878df50e8..dc0889a3ba8 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -133,6 +133,11 @@ static void mysql_close_free(MYSQL *mysql); static int wait_for_data(my_socket fd, uint timeout); #endif +#if defined(__WIN__) && defined(HAVE_REPLICATION) && defined(MYSQL_SERVER) +void clear_slave_vio( MYSQL* mysql ); +#endif + + /**************************************************************************** A modified version of connect(). my_connect() allows you to specify a timeout value, in seconds, that we should wait until we @@ -818,6 +823,12 @@ void end_server(MYSQL *mysql) init_sigpipe_variables DBUG_PRINT("info",("Net: %s", vio_description(mysql->net.vio))); set_sigpipe(mysql); + +#if defined(__WIN__) && defined(HAVE_REPLICATION) && defined(MYSQL_SERVER) + /* if this mysql is one of our connections to the master, then clear it */ + clear_slave_vio( mysql ); +#endif + vio_delete(mysql->net.vio); reset_sigpipe(mysql); mysql->net.vio= 0; /* Marker */ |