Debian Codegraph @

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

raw
1 DROP DATABASE IF EXISTS `drop-temp+table-test`;
2 RESET MASTER;
3 CREATE DATABASE `drop-temp+table-test`;
4 USE `drop-temp+table-test`;
5 CREATE TEMPORARY TABLE shortn1 (a INT);
6 CREATE TEMPORARY TABLE `table:name` (a INT);
7 CREATE TEMPORARY TABLE shortn2 (a INT);
8 CREATE TEMPORARY TABLE tmp(c1 int);
9 CREATE TEMPORARY TABLE tmp1(c1 int);
10 CREATE TEMPORARY TABLE tmp2(c1 int);
11 CREATE TEMPORARY TABLE tmp3(c1 int);
12 CREATE TABLE t(c1 int);
13 DROP TEMPORARY TABLE IF EXISTS tmp;
14 DROP TEMPORARY TABLE IF EXISTS tmp;
15 DROP TEMPORARY TABLE IF EXISTS tmp, tmp1;
16 DROP TEMPORARY TABLE tmp3;
17 DROP TABLE IF EXISTS tmp2, t;
18 DROP TABLE IF EXISTS tmp2, t;
19 SELECT GET_LOCK("a",10);
20 GET_LOCK("a",10)
21 1
22 USE test;
23 SELECT GET_LOCK("a",10);
24 GET_LOCK("a",10)
25 1
26 include/show_binlog_events.inc
27 Log_name Pos Event_type Server_id End_log_pos Info
28 binlog.000001 # Query # # CREATE DATABASE `drop-temp+table-test`
29 binlog.000001 # Query # # use `drop-temp+table-test`; CREATE TABLE t(c1 int)
30 binlog.000001 # Query # # use `drop-temp+table-test`; DROP TABLE IF EXISTS `t` /* generated by server */
31 binlog.000001 # Query # # use `drop-temp+table-test`; DROP TABLE IF EXISTS `tmp2`,`t` /* generated by server */
32 DROP DATABASE `drop-temp+table-test`;
33 RESET MASTER;
34 #
35 # Bug 83003: Using temporary tables on slaves increases GTID sequence number
36 #
37 CREATE TEMPORARY TABLE temp_trx(a INT) ENGINE=InnoDB;
38 CREATE TEMPORARY TABLE temp_needs_logging_in_stmt(a INT) ENGINE=InnoDB;
39 SET SESSION sql_log_bin= 0;
40 CREATE TEMPORARY TABLE temp_binlog_disabled(a INT) ENGINE=InnoDB;
41 SET SESSION sql_log_bin= 1;
42 include/show_binlog_events.inc
43 Log_name Pos Event_type Server_id End_log_pos Info
44 #
45 # BUG#21638823: ASSERTION FAILED:
46 # THD->GET_TRANSACTION()->IS_EMPTY(TRANSACTION_CTX::STMT) || THD
47 #
48 # Test case first checks that it is possible to terminate a connection
49 # with a temporary table (which will implicitly remove the temporary
50 # table) while in XA_idle. Then checks that an explicit DROP TEMPORARY
51 # TABLE is rejected with ER_XAER_RMFAIL as required by the XA spec.
52 #
53 # Reset master to avoid clutter when dumping binlog
54 RESET MASTER;
55 # Create separate connection
56 # Create temporary table
57 CREATE TEMPORARY TABLE temp(i int);
58 INSERT INTO temp VALUES (0), (1), (2), (3);
59 # Start XA txn and leave it in XA_idle
60 XA START 'idle_at_disconnect';
61 XA END 'idle_at_disconnect';
62 # Terminate connection to verify that the temporary table can be
63 # removed at disconnect even in XA_idle, and that this does not
64 # cause problems for replication
65 # Dump binlog to show that, either the generated DROP comes after tx
66 # commit (stmt), or there is no trace of the XA txn and
67 # the temp table (row or mixed)
68 include/show_binlog_events.inc
69 Log_name Pos Event_type Server_id End_log_pos Info
70 #
71 # Start XA txn and leave in XA_idle
72 XA START 'idle_when_drop_temp';
73 XA END 'idle_when_drop_temp';
74 # Verify that explicit DROP TEMPORARY TABLE is rejected in XA_idle
75 DROP TEMPORARY TABLE IF EXISTS t;
76 Got one of the listed errors
77 XA ROLLBACK 'idle_when_drop_temp';
78 RESET MASTER;
79 #
80 # BUG#28642318: POINT IN TIME RECOVERY USING MYSQLBINLOG BROKEN
81 # WITH TEMPORARY TABLE -> ERRORS
82 # Test case for DELETE query.
83 RESET MASTER;
84 # Set up.
85 SET @save_binlog_format= @@session.binlog_format;
86 SET @@session.binlog_format=STATEMENT;
87 CREATE TABLE t1 (a INT) ENGINE=INNODB;
88 SET @@session.binlog_format=STATEMENT;
89 CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
90 DELETE d1, d2 FROM t1 AS d1, t1 AS d2 WHERE d1.a<>d2.a;
91 DROP TABLE t1;
92 # DELETE query fails with table re-open error without patch.
93 # Clean up.
94 DROP TABLE IF EXISTS t1;
95 DROP TABLE IF EXISTS t1;
96 RESET MASTER;
97 # Test case for DROP query.
98 CREATE TABLE t1 (a INT) ENGINE=INNODB;
99 CREATE TEMPORARY TABLE t1 (b BLOB) ENGINE=INNODB;
100 DROP TABLE t1;
101 DROP TABLE t1;
102 # DROP table query fails with unknown table error without patch.
103 # Clean up
104 SET @@session.binlog_format= @save_binlog_format;
105 RESET MASTER;