Debian Codegraph @

mysql-test/suite/galera/t/galera_var_OSU_method.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 = "RSU";
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 --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables'
22 --source include/wait_condition.inc
23
24 SET GLOBAL wsrep_OSU_method = "TOI";
25 SET DEBUG_SYNC= 'now SIGNAL continue';
26
27 --connection node_1
28 --reap
29
30 SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
31
32 --connection node_2
33 # The ALTER above is not visible on node_2
34 SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
35
36 --connection node_1
37 SET SESSION wsrep_OSU_method = "TOI";
38
39 --connection node_1
40 SET DEBUG_SYNC= 'RESET';
41
42 --connection node_1a
43 SET DEBUG_SYNC= 'RESET';
44
45 DROP TABLE t1;