Debian Codegraph @

mysql-test/suite/galera/t/galera_var_OSU_method2.test

raw
1 #
2 # Test that the wsrep_var_OSU_method variable can be changed in the middle of an ALTER without adverse effects.
3 # In-depth testing of various OSU methods is implemented in separate tests.
4 #
5
6 --source include/galera_cluster.inc
7 --source include/have_innodb.inc
8 --source include/have_debug_sync.inc
9
10 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
11
12 --connection node_1
13 SET SESSION wsrep_OSU_method = "TOI";
14 SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
15 --send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
16
17
18 --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
19 --connection node_1a
20
21 SET SESSION wsrep_sync_wait = 0;
22
23 --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables'
24 --source include/wait_condition.inc
25
26 SET GLOBAL wsrep_OSU_method = "RSU";
27 SET DEBUG_SYNC= 'now SIGNAL continue';
28
29 --connection node_1
30 --reap
31
32 SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
33 INSERT INTO t1 VALUES (1,2);
34
35 --connection node_2
36 # The ALTER above is visible on node_2
37 SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
38 INSERT INTO t1 VALUES (3,4);
39
40 --connection node_1
41 SET GLOBAL wsrep_OSU_method = "TOI";
42 DROP TABLE t1;
43 SET DEBUG_SYNC= 'RESET';
44
45 --connection node_1a
46 SET DEBUG_SYNC= 'RESET';