summaryrefslogtreecommitdiff
path: root/mysql-test/include/install_semisync.inc
diff options
context:
space:
mode:
authorVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2013-03-29 09:28:31 +0530
committerVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2013-03-29 09:28:31 +0530
commit00b840b48afac3aabaf8e5b1522dc3d289ba2190 (patch)
tree01db12c06bd2e55f4613349e2a10813754d13278 /mysql-test/include/install_semisync.inc
parent00ee67dece60e5a14b5907383aa63b49f6c48b33 (diff)
downloadmariadb-git-00b840b48afac3aabaf8e5b1522dc3d289ba2190.tar.gz
Bug#15948818-SEMI-SYNC ENABLED MASTER CRASHES WHEN EVENT
SCHEDULER DROPS EVENTS Problem: On a semi sync enabled server (Master/Slave), if event scheduler drops an event after completion, server crashes. Analaysis: If an event is created with "ON COMPLETION NOT PRESERVE" clause, event scheduler deletes the event upon event completion(expiration) and the thread object will be destroyed. In the destructor of the thread object, mysys_var member is set to zero explicitly. Later from the same destructor call(same execution path), incase of semi sync enabled server, while cleanup is called, THD::mysys_var member is accessed by THD::enter_cond() function which causes server to crash. Fix: mysys_var should not be explicitly set to zero and also it is not required. sql/sql_class.cc: mysys_var should not be explicitly set to zero.
Diffstat (limited to 'mysql-test/include/install_semisync.inc')
-rw-r--r--mysql-test/include/install_semisync.inc39
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/include/install_semisync.inc b/mysql-test/include/install_semisync.inc
new file mode 100644
index 00000000000..368b7b7cb4a
--- /dev/null
+++ b/mysql-test/include/install_semisync.inc
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+--let $include_filename= install_semisync.inc
+--source include/begin_include_file.inc
+
+--source include/not_embedded.inc
+--source include/have_semisync_plugin.inc
+
+--connection master
+
+--disable_query_log
+--let $value = query_get_value(show variables like 'rpl_semi_sync_master_enabled', Value, 1)
+if ($value == No such row)
+{
+ SET sql_log_bin = 0;
+ eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
+ SET GLOBAL rpl_semi_sync_master_enabled = 1;
+ SET sql_log_bin = 1;
+}
+--enable_query_log
+
+--connection slave
+--source include/stop_slave_io.inc
+
+--disable_query_log
+--let $value= query_get_value(show variables like 'rpl_semi_sync_slave_enabled', Value, 1)
+if ($value == No such row)
+{
+ SET sql_log_bin = 0;
+ eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
+ SET GLOBAL rpl_semi_sync_slave_enabled = 1;
+ SET sql_log_bin = 1;
+}
+START SLAVE IO_THREAD;
+--source include/wait_for_slave_io_to_start.inc
+--enable_query_log
+
+--source include/end_include_file.inc