Debian Codegraph @

mysql-test/suite/galera/t/galera_table_with_hyphen.inc

raw
1 #
2 # parameters:
3 # $fk_child - child table name
4 # $fk_parent - parent table name
5 #
6 --connection node_1
7 SET GLOBAL wsrep_slave_threads=2;
8
9 --eval CREATE TABLE `$fk_parent` ( id INT AUTO_INCREMENT PRIMARY KEY, j INT) ENGINE=InnoDB
10
11 --eval CREATE TABLE `$fk_child` (id INT AUTO_INCREMENT PRIMARY KEY, parent_id INT, j INT, FOREIGN KEY (parent_id) REFERENCES `$fk_parent`(id)) ENGINE=InnoDB
12
13 --eval INSERT INTO `$fk_parent` VALUES (23,0)
14
15 --connection node_2
16 --let $wait_condition = SELECT COUNT(*) = 1 FROM `$fk_parent`;
17 --source include/wait_condition.inc
18
19 --connection node_1a
20 SET GLOBAL DEBUG_DBUG='+d,wsrep_ha_write_row';
21
22 --connection node_2
23 --eval INSERT INTO `$fk_child` VALUES (21,23,0),(22,23,0),(23,23,0)
24
25 --connection node_1a
26 SET DEBUG_SYNC='now WAIT_FOR wsrep_ha_write_row_reached';
27
28 --let $wsrep_received_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_received'`
29
30 --connection node_2
31 --eval UPDATE `$fk_parent` SET j=2 WHERE id=23
32
33 --connection node_1a
34 --let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_received_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_received'
35 --source include/wait_condition.inc
36
37 SET GLOBAL DEBUG_DBUG='-d,wsrep_ha_write_row';
38 SET DEBUG_SYNC='now SIGNAL wsrep_ha_write_row_continue';
39
40 SET GLOBAL DEBUG_DBUG="RESET";
41 SET DEBUG_SYNC = 'RESET';
42
43 SET GLOBAL wsrep_slave_threads=DEFAULT;
44
45 --connection node_2
46 --eval drop table `$fk_child`
47 --eval drop table `$fk_parent`