Debian Codegraph @

mysql-test/suite/rpl/r/rpl_kill_query.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 CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
7 CALL mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
8 ==== Case 1: Killed query on master -> error on slave ====
9 include/assert.inc [Test only works if binlog_format is statement]
10 [connection master]
11 CREATE DATABASE db1;
12 USE db1;
13 CREATE TABLE t1 (a INT) ENGINE = MyISAM;
14 CREATE TABLE trigger_table (a INT) ENGINE = MyISAM;
15 SET SQL_LOG_BIN=0;
16 CREATE TRIGGER trig1 BEFORE INSERT ON t1 FOR EACH ROW
17 BEGIN
18 IF NEW.a != 0 THEN
19 SET @@GLOBAL.BINLOG_FORMAT = 'row';
20 DO SLEEP(1000000);
21 END IF;
22 INSERT INTO trigger_table VALUES (1);
23 END|
24 SET SQL_LOG_BIN=1;
25 INSERT INTO t1 VALUES (0), (1);
26 [connection master1]
27 KILL QUERY <CONNECTION_ID>;
28 [connection master]
29 ERROR 70100: Query execution was interrupted
30 SET @@GLOBAL.BINLOG_FORMAT = 'STATEMENT';
31 Warnings:
32 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
33 include/assert.inc [At most one row should be inserted in db1.t1]
34 include/assert.inc [At least one row should be inserted in db1.trigger_table]
35 SET SQL_LOG_BIN=0;
36 DROP TRIGGER trig1;
37 SET SQL_LOG_BIN=1;
38 DROP TABLE trigger_table;
39 DROP TABLE t1;
40 DROP DATABASE db1;
41 USE test;
42 ---- Verify there is an error on slave ----
43 include/sync_slave_io_with_master.inc
44 include/wait_for_slave_sql_error.inc [errno=3001]
45 ---- Verify that nothing was inserted on slave -----
46 include/assert.inc [Nothing should be inserted on slave]
47 ---- Clean up ----
48 include/stop_slave_io.inc
49 RESET SLAVE;
50 Warnings:
51 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
52 RESET MASTER;
53 DROP DATABASE db1;
54 [connection master]
55 RESET MASTER;
56 [connection slave]
57 include/start_slave.inc
58 [connection master]
59 ==== Case 2: Master kills query -> no error if slave filters by db ====
60 include/assert.inc [Test only works if binlog_format is statement]
61 [connection master]
62 CREATE DATABASE ignored_db;
63 USE ignored_db;
64 CREATE TABLE t1 (a INT) ENGINE = MyISAM;
65 CREATE TABLE trigger_table (a INT) ENGINE = MyISAM;
66 SET SQL_LOG_BIN=0;
67 CREATE TRIGGER trig1 BEFORE INSERT ON t1 FOR EACH ROW
68 BEGIN
69 IF NEW.a != 0 THEN
70 SET @@GLOBAL.BINLOG_FORMAT = 'row';
71 DO SLEEP(1000000);
72 END IF;
73 INSERT INTO trigger_table VALUES (1);
74 END|
75 SET SQL_LOG_BIN=1;
76 INSERT INTO t1 VALUES (0), (1);
77 [connection master1]
78 KILL QUERY <CONNECTION_ID>;
79 [connection master]
80 ERROR 70100: Query execution was interrupted
81 SET @@GLOBAL.BINLOG_FORMAT = 'STATEMENT';
82 Warnings:
83 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
84 include/assert.inc [At most one row should be inserted in ignored_db.t1]
85 include/assert.inc [At least one row should be inserted in ignored_db.trigger_table]
86 SET SQL_LOG_BIN=0;
87 DROP TRIGGER trig1;
88 SET SQL_LOG_BIN=1;
89 DROP TABLE trigger_table;
90 DROP TABLE t1;
91 DROP DATABASE ignored_db;
92 USE test;
93 ---- Verify all was replicated ok ----
94 include/sync_slave_sql_with_master.inc
95 [connection master]
96 ==== Case 3: Master kills query -> no error if slave filters by table ====
97 include/assert.inc [Test only works if binlog_format is statement]
98 [connection master]
99 CREATE DATABASE db1;
100 USE db1;
101 CREATE TABLE ignored_table (a INT) ENGINE = MyISAM;
102 CREATE TABLE trigger_table (a INT) ENGINE = MyISAM;
103 SET SQL_LOG_BIN=0;
104 CREATE TRIGGER trig1 BEFORE INSERT ON ignored_table FOR EACH ROW
105 BEGIN
106 IF NEW.a != 0 THEN
107 SET @@GLOBAL.BINLOG_FORMAT = 'row';
108 DO SLEEP(1000000);
109 END IF;
110 INSERT INTO trigger_table VALUES (1);
111 END|
112 SET SQL_LOG_BIN=1;
113 INSERT INTO ignored_table VALUES (0), (1);
114 [connection master1]
115 KILL QUERY <CONNECTION_ID>;
116 [connection master]
117 ERROR 70100: Query execution was interrupted
118 SET @@GLOBAL.BINLOG_FORMAT = 'STATEMENT';
119 Warnings:
120 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
121 include/assert.inc [At most one row should be inserted in db1.ignored_table]
122 include/assert.inc [At least one row should be inserted in db1.trigger_table]
123 SET SQL_LOG_BIN=0;
124 DROP TRIGGER trig1;
125 SET SQL_LOG_BIN=1;
126 DROP TABLE trigger_table;
127 DROP TABLE ignored_table;
128 DROP DATABASE db1;
129 USE test;
130 ---- Verify all was replicated ok ----
131 include/sync_slave_sql_with_master.inc
132 include/rpl_end.inc