From 653ef22336a5c14404b9690bb44df702292463b2 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Thu, 6 Mar 2014 18:44:16 -0500 Subject: [PATCH] MDEV#5687: Maria doesn't shutdown following upgrade to 5.5.35-galera Restored patch for MDEV#4136 and added a test. --- mysql-test/suite/wsrep/r/pool_of_threads.result | 8 ++++++++ mysql-test/suite/wsrep/t/pool_of_threads.opt | 1 + mysql-test/suite/wsrep/t/pool_of_threads.test | 11 +++++++++++ sql/mysqld.cc | 4 +--- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 mysql-test/suite/wsrep/r/pool_of_threads.result create mode 100644 mysql-test/suite/wsrep/t/pool_of_threads.opt create mode 100644 mysql-test/suite/wsrep/t/pool_of_threads.test diff --git a/mysql-test/suite/wsrep/r/pool_of_threads.result b/mysql-test/suite/wsrep/r/pool_of_threads.result new file mode 100644 index 00000000000..ffe309f2580 --- /dev/null +++ b/mysql-test/suite/wsrep/r/pool_of_threads.result @@ -0,0 +1,8 @@ + +# +# MDEV#5687: Maria doesn't shutdown following upgrade to 5.5.35-galera +# +SELECT @@GLOBAL.thread_handling; +@@GLOBAL.thread_handling +pool-of-threads +# End of test. diff --git a/mysql-test/suite/wsrep/t/pool_of_threads.opt b/mysql-test/suite/wsrep/t/pool_of_threads.opt new file mode 100644 index 00000000000..92994ddfb68 --- /dev/null +++ b/mysql-test/suite/wsrep/t/pool_of_threads.opt @@ -0,0 +1 @@ +--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=/usr/lib/galera/libgalera_smm.so --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads diff --git a/mysql-test/suite/wsrep/t/pool_of_threads.test b/mysql-test/suite/wsrep/t/pool_of_threads.test new file mode 100644 index 00000000000..f4fffaf4f9a --- /dev/null +++ b/mysql-test/suite/wsrep/t/pool_of_threads.test @@ -0,0 +1,11 @@ +--source include/have_wsrep.inc + +--echo +--echo # +--echo # MDEV#5687: Maria doesn't shutdown following upgrade to 5.5.35-galera +--echo # + +# Note: This test is to ensure that server shuts down properly. +SELECT @@GLOBAL.thread_handling; + +--echo # End of test. diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 4703d426b51..829bc0be763 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4912,7 +4912,7 @@ pthread_handler_t start_wsrep_THD(void *arg) // at server shutdown } -#if 0 + my_thread_end(); if (thread_handling > SCHEDULER_ONE_THREAD_PER_CONNECTION) { mysql_mutex_lock(&LOCK_thread_count); @@ -4920,8 +4920,6 @@ pthread_handler_t start_wsrep_THD(void *arg) thread_count--; mysql_mutex_unlock(&LOCK_thread_count); } -#endif - my_thread_end(); return(NULL); }