Debian Codegraph @

mysql-test/suite/galera/t/MW-44.test

raw
1 #
2 # MW-44: DDL is logged in the general_log on the slave
3 #
4
5 --source include/galera_cluster.inc
6
7 --connection node_1
8 TRUNCATE TABLE mysql.general_log;
9
10 --connection node_2
11 --let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE '%mysql.general_log%'
12 --let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
13 --source include/wait_condition_with_debug.inc
14
15 --connection node_1
16 SET SESSION wsrep_osu_method=TOI;
17 CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
18 SET SESSION wsrep_osu_method=RSU;
19 ALTER TABLE t1 ADD COLUMN f2 INTEGER;
20 SET SESSION wsrep_osu_method=TOI;
21
22 --let $wait_condition = SELECT COUNT(*) = 1 FROM mysql.general_log WHERE argument LIKE "CREATE%" AND command_type != 'Prepare'
23 --let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
24 --source include/wait_condition_with_debug.inc
25
26 --let $wait_condition = SELECT COUNT(*) = 1 FROM mysql.general_log WHERE argument LIKE "ALTER%" AND command_type != 'Prepare'
27 --let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
28 --source include/wait_condition_with_debug.inc
29
30 --connection node_2
31
32 --let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%"
33 --let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
34 --source include/wait_condition_with_debug.inc
35
36 DROP TABLE t1;