Debian Codegraph @

mysql-test/suite/rpl/r/rpl_slave_grp_exec.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6
7 *** Preparing data ***
8 CREATE TABLE t1 (a INT NOT NULL, b VARCHAR(10)) ENGINE=MyISAM;
9 CREATE TABLE t2 LIKE t1;
10 CREATE TABLE t3 LIKE t1;
11 CREATE TRIGGER tr1 BEFORE UPDATE ON t1
12 FOR EACH ROW BEGIN
13 UPDATE t2 SET b='YY' WHERE a=NEW.a;
14 END|
15 CREATE TRIGGER tr2 AFTER UPDATE ON t1
16 FOR EACH ROW BEGIN
17 UPDATE t3 SET b='ZZ' WHERE a=NEW.a;
18 END|
19
20 *** Test non-transactional group w/o PK ***
21 INSERT INTO t3 VALUES(1, 'AA');
22 INSERT INTO t2 VALUES(1, 'AA');
23 INSERT INTO t1 VALUES(1, 'AA');
24 include/sync_slave_sql_with_master.inc
25 RENAME TABLE t3 TO t3_bak;
26 UPDATE t1 SET b = 'XX' WHERE a = 1;
27 SELECT * FROM t1 ORDER BY a;
28 a b
29 1 XX
30 SELECT * FROM t2 ORDER BY a;
31 a b
32 1 YY
33 SELECT * FROM t3 ORDER BY a;
34 a b
35 1 ZZ
36 call mtr.add_suppression("Replica SQL.*Table .test.t3. doesn.t exist.*, Error_code: MY-001146");
37 call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
38 include/wait_for_slave_sql_to_stop.inc
39 SHOW TABLES LIKE 't%';
40 Tables_in_test (t%)
41 t1
42 t2
43 t3_bak
44 SELECT * FROM t1 ORDER BY a;
45 a b
46 1 AA_for_row_or_XX_for_stmt_mixed
47 SELECT * FROM t2 ORDER BY a;
48 a b
49 1 AA_for_row_or_YY_for_stmt_mixed
50 include/stop_slave_io.inc
51 RENAME TABLE t3_bak TO t3;
52 include/start_slave.inc
53 TRUNCATE t1;
54 TRUNCATE t2;
55 TRUNCATE t3;
56 include/sync_slave_sql_with_master.inc
57
58 *** Test non-transactional group w/ PK ***
59 ALTER TABLE t1 ADD PRIMARY KEY (a);
60 ALTER TABLE t2 ADD PRIMARY KEY (a);
61 ALTER TABLE t3 ADD PRIMARY KEY (a);
62 include/sync_slave_sql_with_master.inc
63 RENAME TABLE t3 TO t3_bak;
64 INSERT INTO t3 VALUES(2, 'B');
65 INSERT INTO t2 VALUES(2, 'B');
66 INSERT INTO t1 VALUES(2, 'B');
67 UPDATE t1 SET b = 'X' WHERE a = 2;
68 include/wait_for_slave_sql_to_stop.inc
69 SELECT * FROM t1 ORDER BY a;
70 a b
71 2 X
72 SELECT * FROM t2 ORDER BY a;
73 a b
74 2 YY
75 SELECT * FROM t3 ORDER BY a;
76 a b
77 2 ZZ
78 SHOW TABLES LIKE 't%';
79 Tables_in_test (t%)
80 t1
81 t2
82 t3_bak
83 SELECT * FROM t1 ORDER BY a;
84 a b
85 SELECT * FROM t2 ORDER BY a;
86 a b
87 include/stop_slave_io.inc
88 RENAME TABLE t3_bak TO t3;
89 include/start_slave.inc
90 TRUNCATE t1;
91 TRUNCATE t2;
92 TRUNCATE t3;
93 include/sync_slave_sql_with_master.inc
94
95 *** Test transactional group w/ PK ***
96 ALTER TABLE t1 ENGINE=InnoDB;
97 ALTER TABLE t2 ENGINE=InnoDB;
98 ALTER TABLE t3 ENGINE=InnoDB;
99 include/sync_slave_sql_with_master.inc
100 RENAME TABLE t3 TO t3_bak;
101 BEGIN;
102 INSERT INTO t1 VALUES (3, 'C'), (4, 'D');
103 INSERT INTO t2 VALUES (3, 'C'), (4, 'D');
104 INSERT INTO t3 VALUES (3, 'C'), (4, 'D');
105 COMMIT;
106 include/wait_for_slave_sql_to_stop.inc
107 SELECT * FROM t1 ORDER BY a;
108 a b
109 3 C
110 4 D
111 SELECT * FROM t2 ORDER BY a;
112 a b
113 3 C
114 4 D
115 SELECT * FROM t3 ORDER BY a;
116 a b
117 3 C
118 4 D
119 SHOW TABLES LIKE 't%';
120 Tables_in_test (t%)
121 t1
122 t2
123 t3_bak
124 SELECT * FROM t1 ORDER BY a;
125 a b
126 SELECT * FROM t2 ORDER BY a;
127 a b
128 include/stop_slave_io.inc
129 RENAME TABLE t3_bak TO t3;
130 include/start_slave.inc
131 *** Clean up ***
132 DROP TABLE t1,t2,t3;
133 include/sync_slave_sql_with_master.inc
134 include/rpl_end.inc