Debian Codegraph @

mysql-test/suite/binlog/r/binlog_truncate_kill.result

raw
1 RESET MASTER;
2 connection default;
3 # MERGE is the only remaning non-specialized SE (like NDB or P_S)
4 # which implements TRUNCATE TABLE through handler::truncate().
5 CREATE TABLE t0(id INT AUTO_INCREMENT PRIMARY KEY, a INT, b INT) ENGINE=MyISAM;
6 CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, a INT, b INT) ENGINE=MERGE UNION=(t0) INSERT_METHOD=LAST;
7 INSERT INTO t1(a, b) VALUES(1,2),(2,4),(3,6),(4,8),(5,10);
8 SET DEBUG_SYNC = "open_and_process_table signal truncate_before_lock wait_for forever";
9 TRUNCATE t1;
10 connect con1,localhost,root,,;
11 SET DEBUG_SYNC = "now wait_for truncate_before_lock";
12 SELECT ((@id := id) - id) FROM information_schema.processlist WHERE processlist.info LIKE '%TRUNCATE t1%' AND state LIKE '%open_and_process_table%';
13 ((@id := id) - id)
14 0
15 Warnings:
16 Warning 1287 Setting user variables within expressions is deprecated and will be removed in a future release. Consider alternatives: 'SET variable=expression, ...', or 'SELECT expression(s) INTO variables(s)'.
17 Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead
18 KILL QUERY @id;
19 connection default;
20 ERROR 70100: Query execution was interrupted
21 connection con1;
22 include/show_binlog_events.inc
23 connection con1;
24 Log_name Pos Event_type Server_id End_log_pos Info
25 binlog.000001 # Query # # use `test`; CREATE TABLE t0(id INT AUTO_INCREMENT PRIMARY KEY, a INT, b INT) ENGINE=MyISAM
26 binlog.000001 # Query # # use `test`; CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, a INT, b INT) ENGINE=MERGE UNION=(t0) INSERT_METHOD=LAST
27 binlog.000001 # Query # # BEGIN
28 binlog.000001 # Intvar # # INSERT_ID=1
29 binlog.000001 # Query # # use `test`; INSERT INTO t1(a, b) VALUES(1,2),(2,4),(3,6),(4,8),(5,10)
30 binlog.000001 # Query # # COMMIT
31 connection con1;
32 connection con1;
33 disconnect con1;
34 connection default;
35 SELECT * FROM t1;
36 id a b
37 1 1 2
38 2 2 4
39 3 3 6
40 4 4 8
41 5 5 10
42 DROP TABLE t1, t0;
43 SET DEBUG_SYNC= 'RESET';