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:
13
mysql-test/suite/wsrep/r/mdev_7798.result
Normal file
13
mysql-test/suite/wsrep/r/mdev_7798.result
Normal 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.
|
||||
1
mysql-test/suite/wsrep/t/mdev_7798.opt
Normal file
1
mysql-test/suite/wsrep/t/mdev_7798.opt
Normal file
@@ -0,0 +1 @@
|
||||
--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --wsrep_causal_reads=ON
|
||||
17
mysql-test/suite/wsrep/t/mdev_7798.test
Normal file
17
mysql-test/suite/wsrep/t/mdev_7798.test
Normal 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.
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user