Commit 2d098933 authored by Jan Lindström's avatar Jan Lindström Committed by GitHub

Merge pull request #880 from tempesta-tech/sysprg/MDEV-17421

MDEV-17421: mtr does not restart the server whose parameters were changed
parents 3b6d2efc 1eb364f8
......@@ -5285,6 +5285,7 @@ sub server_need_restart {
exists $server->{'restart_opts'})
{
my $use_dynamic_option_switch= 0;
delete $server->{'restart_opts'};
if (!$use_dynamic_option_switch)
{
mtr_verbose_restart($server, "running with different options '" .
......
......@@ -30,4 +30,3 @@ galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit
galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion
galera_wan : MDEV-17259: Test failure on galera.galera_wan
galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb
galera_drop_database : test
......@@ -9,6 +9,7 @@
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
# Create test database with two sets of the FTS indexes:
CREATE DATABASE fts;
USE fts;
CREATE TABLE fts_t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB;
......@@ -23,34 +24,19 @@ DROP TABLE ten;
UPDATE fts_t1 SET f2 = 'abcd';
UPDATE fts_t2 SET f2 = 'efjh';
# Restart the second node:
--connection node_2
let $wsrep_cluster_address = `SELECT @@global.wsrep_node_incoming_address`;
--source include/restart_mysqld.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--let $galera_connection_name = node_2a
--let $galera_server_number = 2
--source include/galera_connect.inc
--connection node_2a
--connection node_2
--source include/wait_until_ready.inc
# Drop the tables and database after nodes restarted:
--connection node_1
--let $restart_parameters = --wsrep-cluster-address=gcomm://$wsrep_cluster_address
--source include/restart_mysqld.inc
--connection node_2a
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--let $galera_connection_name = node_1a
--let $galera_server_number = 1
--source include/galera_connect.inc
--connection node_1a
--source include/wait_until_ready.inc
USE fts;
DROP TABLE fts_t1;
DROP TABLE fts_t2;
......@@ -58,8 +44,4 @@ SHOW TABLES;
DROP DATABASE fts;
# Restore original auto_increment_offset values.
--let $node_1=node_1a
--let $node_2=node_2a
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc
# This test verifies that mtr will restart the mysqld process,
# whose parameters were changed during the test. The verification
# itself is carried out in the following galera_mtr_restart_t2
# test. If mtr restart the mysqld process, then the pc.weight
# value will be reset to the default ("1"), but if there is no
# restart, then we will see the changed value ("111") during
# the next test.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--connection node_2
--let $restart_parameters = --wsrep_provider_options=pc.weight=111;repl.causal_read_timeout=PT90S;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S
--source include/restart_mysqld.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--connection node_2
--source include/wait_until_ready.inc
# Check that the parameter value really changed:
--let $gp = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('pc.weight =', @@wsrep_provider_options) + LENGTH('pc.weight = '))`
--let $weight = `SELECT SUBSTR('$gp', 1, LOCATE(';', '$gp') - 1)`
--echo weight=$weight
# Restore original auto_increment_offset values.
--connection node_1
--source include/auto_increment_offset_restore.inc
# This test verifies that mtr will restart the mysqld process,
# whose parameters were changed during the previous test. If mtr
# restart the mysqld process, then the pc.weight value will be
# reset to the default ("1"), but if there is no restart, then
# we will see the changed value ("111") in this test.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_2
--let $gp = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('pc.weight =', @@wsrep_provider_options) + LENGTH('pc.weight = '))`
--let $weight = `SELECT SUBSTR('$gp', 1, LOCATE(';', '$gp') - 1)`
--echo weight=$weight
include/master-slave.inc
[connection master]
include/rpl_stop_server.inc [server_number=1]
new auto_increment_offset=111
include/rpl_end.inc
include/master-slave.inc
[connection master]
auto_increment_offset=1
include/rpl_end.inc
# This test verifies that mtr will restart the mysqld process,
# whose parameters were changed during the test. The verification
# itself is carried out in the following mtr_restart_t2 test.
# If mtr restart the mysqld process, then the auto_increment_offset
# parameter value will be reset to the default ("1"), but if there
# is no restart, then we will see the changed value ("111") during
# the next test.
#
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
connection master;
let $auto_increment_offset = `SELECT @@global.auto_increment_offset`;
--let $rpl_server_number=1
source include/rpl_stop_server.inc;
--let $rpl_server_parameters=--auto-increment-offset=111
--let $keep_include_silent=1
source include/rpl_start_server.inc;
--let $keep_include_silent=0
let $auto_increment_offset_new = `SELECT @@global.auto_increment_offset`;
--echo new auto_increment_offset=$auto_increment_offset_new
--disable_query_log
--eval SET @@global.auto_increment_offset = $auto_increment_offset;
--enable_query_log
--connection master
--source include/rpl_end.inc
# This test verifies that mtr will restart the mysqld process,
# whose parameters were changed during the previous test. If mtr
# restart the mysqld process, then the auto_increment_offsert
# parameter value will be reset to the default ("1"), but if there
# is no restart, then we will see the changed value ("111") in
# this test.
#
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
connection master;
let $auto_increment_offset = `SELECT @@global.auto_increment_offset`;
--echo auto_increment_offset=$auto_increment_offset
--connection master
--source include/rpl_end.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment