summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <rburnett@build.mysql.com>2004-08-21 05:07:32 +0200
committerunknown <rburnett@build.mysql.com>2004-08-21 05:07:32 +0200
commit2eb954a27a6aa6bf0f4e9c480dc8a633649595f1 (patch)
tree03545c923a460000e555bccce9e6025220a90f58 /sql
parent7c46252467101d841de5b7774b4f5b6ddf858d9f (diff)
downloadmariadb-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')
-rw-r--r--sql/slave.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 7fb7fbdade4..51421533a5b 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -4383,4 +4383,26 @@ template class I_List_iterator<i_string>;
template class I_List_iterator<i_string_pair>;
#endif
+
+#ifdef __WIN__
+extern "C" void clear_slave_vio( MYSQL* mysql )
+{
+ if (active_mi->mysql == mysql)
+ active_mi->io_thd->clear_active_vio();
+ /* TODO: use code like below when multi-master is in place */
+ /* LIST *cur = &master_list;
+ if (((MASTER_INFO*)cur->data)->mysql == mysql)
+ {
+ MASTER_INFO *mi = (MASTER_INFO*)cur->data;
+ mi->io_thd->clear_active_vio();
+ return;
+ }
+ else
+ cur = cur->next;*/
+}
+#endif
+
+
+
+
#endif /* HAVE_REPLICATION */