1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

MDEV-7798: mysql.server init script can't stop mysqld when WSREP is turned off

wsrep threads should be always be checked for existence & stopped on
server shutdown.
This commit is contained in:
Nirbhay Choubey
2015-03-24 16:41:04 -04:00
parent 7a6cad5221
commit 6a204546ef
4 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
#
# MDEV-7798: mysql.server init script can't stop mysqld when WSREP is
# turned off
#
SELECT @@GLOBAL.WSREP_ON;
@@GLOBAL.WSREP_ON
1
SET GLOBAL WSREP_ON= 0;
Restart the node.
SELECT @@GLOBAL.WSREP_ON;
@@GLOBAL.WSREP_ON
1
# End of test.

View File

@@ -0,0 +1 @@
--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --wsrep_causal_reads=ON

View File

@@ -0,0 +1,17 @@
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
--echo #
--echo # MDEV-7798: mysql.server init script can't stop mysqld when WSREP is
--echo # turned off
--echo #
SELECT @@GLOBAL.WSREP_ON;
SET GLOBAL WSREP_ON= 0;
--echo Restart the node.
--source include/restart_mysqld.inc
SELECT @@GLOBAL.WSREP_ON;
--echo # End of test.

View File

@@ -1753,7 +1753,8 @@ static void __cdecl kill_server(int sig_ptr)
}
#endif
#ifdef WITH_WSREP
if (WSREP_ON) wsrep_stop_replication(NULL);
/* Stop wsrep threads in case they are running. */
wsrep_stop_replication(NULL);
#endif
close_connections();