Follow up fixes for making @@wsrep_provider read-only

* Remove usage of wsrep_provider variable in galera_ist_restart_joiner
* Rename galera_load_provider.inc and galera_unload_provider.inc to
  galera_stop_replication.inc and galera_start_replication.inc. Their
  original names were no longer reflecting what these include files do.

followup for ce3a2a688d

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
Daniele Sciascia 2021-03-22 11:36:33 +01:00 committed by Jan Lindström
parent 9e57bd278f
commit 3dae564703
8 changed files with 11 additions and 10 deletions

View file

@ -21,7 +21,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
--source suite/galera/include/galera_unload_provider.inc
--source suite/galera/include/galera_stop_replication.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
@ -53,7 +53,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
--connection node_2
--source suite/galera/include/galera_load_provider.inc
--source suite/galera/include/galera_start_replication.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc

View file

@ -3,8 +3,9 @@ connection node_2;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'),(6, 'a');
connection node_2;
SET SESSION wsrep_sync_wait=0;
Unloading wsrep provider ...
SET GLOBAL wsrep_provider = 'none';
SET GLOBAL wsrep_cluster_address = '';
connection node_1;
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;

View file

@ -21,7 +21,8 @@ INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'),(6, 'a');
# Disconnect node #2
--connection node_2
--source suite/galera/include/galera_unload_provider.inc
SET SESSION wsrep_sync_wait=0;
--source suite/galera/include/galera_stop_replication.inc
--connection node_1
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
@ -45,7 +46,6 @@ UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
--disable_query_log
# base_port setting is lost for some reason when unloading provider, so we need to restore it
--eval SET GLOBAL wsrep_provider_options= 'base_port=$NODE_GALERAPORT_2';
--eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
# Make sure IST will block ...
--let $galera_sync_point = recv_IST_after_apply_trx
--source include/galera_set_sync_point.inc

View file

@ -10,7 +10,7 @@
--connection node_2
#--connection node_2
#--source suite/galera/include/galera_unload_provider.inc
#--source suite/galera/include/galera_stop_replication.inc
--echo Shutting down server ...
--source include/shutdown_mysqld.inc

View file

@ -37,7 +37,7 @@ SET GLOBAL wsrep_sst_method = 'mysqldump';
#
#--connection node_2
#--source suite/galera/include/galera_unload_provider.inc
#--source suite/galera/include/galera_stop_replication.inc
--echo Shutting down server ...
--source include/shutdown_mysqld.inc
@ -62,7 +62,7 @@ INSERT INTO t1 VALUES (1);
--let $start_mysqld_params = --wsrep_sst_auth=sst: --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=[::1].1:$NODE_MYPORT_2
--source include/start_mysqld.inc
#--source suite/galera/include/galera_load_provider.inc
#--source suite/galera/include/galera_start_replication.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc

View file

@ -29,10 +29,10 @@ INSERT INTO t1 VALUES (01), (02), (03), (04), (05);
# Disconnect nodes #2 and #3
--connection node_2
--source suite/galera/include/galera_unload_provider.inc
--source suite/galera/include/galera_stop_replication.inc
--connection node_3
--source suite/galera/include/galera_unload_provider.inc
--source suite/galera/include/galera_stop_replication.inc
--connection node_1
--source include/wait_until_connected_again.inc