Merge lp:~gl-az/percona-server/ST-41544-5.6 into lp:percona-server/5.6

Proposed by George Ormond Lorch III
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: 688
Merged at revision: 688
Proposed branch: lp:~gl-az/percona-server/ST-41544-5.6
Merge into: lp:percona-server/5.6
Diff against target: 2912 lines (+978/-685)
49 files modified
mysql-test/extra/binlog_tests/drop_temp_table.test (+1/-0)
mysql-test/extra/binlog_tests/tmp_table.test (+0/-1)
mysql-test/extra/rpl_tests/rpl_drop_temp.test (+0/-4)
mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test (+40/-15)
mysql-test/extra/rpl_tests/rpl_innodb.test (+6/-1)
mysql-test/extra/rpl_tests/rpl_rewrt_db.test (+1/-3)
mysql-test/suite/binlog/r/binlog_database.result (+1/-2)
mysql-test/suite/binlog/r/binlog_format_switch_in_tmp_table.result (+0/-78)
mysql-test/suite/binlog/r/binlog_mix_drop_tmp_tbl.result (+56/-0)
mysql-test/suite/binlog/r/binlog_mix_tmp_table.result (+44/-0)
mysql-test/suite/binlog/r/binlog_row_tmp_table.result (+44/-0)
mysql-test/suite/binlog/r/binlog_stm_binlog.result (+8/-8)
mysql-test/suite/binlog/t/binlog_format_switch_in_tmp_table.test (+0/-76)
mysql-test/suite/binlog/t/binlog_mix_drop_tmp_tbl.test (+4/-0)
mysql-test/suite/binlog/t/binlog_mix_tmp_table.test (+2/-0)
mysql-test/suite/binlog/t/binlog_row_tmp_table.test (+2/-0)
mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test (+1/-2)
mysql-test/suite/binlog/t/binlog_stm_tmp_table.test (+2/-0)
mysql-test/suite/rpl/r/rpl_bug58546.result (+47/-0)
mysql-test/suite/rpl/r/rpl_gtid_empty_transaction.result (+2/-2)
mysql-test/suite/rpl/r/rpl_mix_drop_temp.result (+43/-0)
mysql-test/suite/rpl/r/rpl_mix_innodb.result (+138/-0)
mysql-test/suite/rpl/r/rpl_mix_rewrt_db.result (+206/-0)
mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result (+128/-168)
mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result (+3/-7)
mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result (+0/-66)
mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result (+0/-66)
mysql-test/suite/rpl/r/rpl_stm_innodb.result (+2/-1)
mysql-test/suite/rpl/r/rpl_stop_slave.result (+0/-47)
mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result (+3/-6)
mysql-test/suite/rpl/t/rpl_bug58546.test (+69/-0)
mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test (+2/-1)
mysql-test/suite/rpl/t/rpl_gtid_empty_transaction.test (+4/-4)
mysql-test/suite/rpl/t/rpl_mix_drop_temp-slave.opt (+2/-0)
mysql-test/suite/rpl/t/rpl_mix_drop_temp.test (+7/-0)
mysql-test/suite/rpl/t/rpl_mix_innodb.test (+11/-0)
mysql-test/suite/rpl/t/rpl_mix_rewrt_db-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_mix_rewrt_db.test (+7/-0)
mysql-test/suite/rpl/t/rpl_row_reset_slave.test (+2/-2)
mysql-test/suite/rpl/t/rpl_stm_drop_temp.test (+7/-0)
mysql-test/suite/rpl/t/rpl_stm_innodb.test (+1/-1)
mysql-test/suite/rpl/t/rpl_stm_reset_slave.test (+1/-1)
mysql-test/suite/rpl/t/rpl_stm_rewrt_db.test (+7/-0)
mysql-test/suite/rpl/t/rpl_stop_slave.test (+8/-88)
mysql-test/suite/rpl/t/rpl_trunc_temp.test (+3/-2)
sql/binlog.cc (+35/-13)
sql/sql_class.h (+3/-18)
sql/sql_table.cc (+17/-2)
sql/sql_truncate.cc (+7/-0)
To merge this branch: bzr merge lp:~gl-az/percona-server/ST-41544-5.6
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+224690@code.launchpad.net

Description of the change

bug 1313901 : When a session creates a temporary table and that table is used
within queries, the binlog format of the session is unconditionally switched to
ROW for the remainder of the session or until all temporary tables have been
dropped.

This is a result of an old fix for upstream 20499.

The consequence this has on the slave is that, the slave is single threaded and
executes all queries from a single session. If the slave is also binlogging, the
slave will unconditionally binlog every statement it receives in ROW format
until all temp tables are dropped. This means statements get logged in different
format on the master and the slave and can introduce huge slave lag.

Through discussion with our varous experts, we decided to undo the original
20499 fix and change the fundamental way MIXED replication works with regard to
temp tables. The new MIXED replication behavior can be summed up as follows:

If using MIXED mode replication, all DDL and DML statements that touch a
temporary table will be marked to binlog in ROW format. This means that any
statement that is using exclusively temporary tables will not be binlogged at
all. Any DDL or DML that uses a mix of temporary and non-temporary tables will
be binlogged in ROW format for the non-temporary table operations. The one
exception is DROP table when dropping a temporary table which will always be
binlogged as DROP TEMPORARY TABLE IF EXISTS on the master.

The code changes to make this happen are very minor but have a huge impact.
Many test cases in the rpl and binlog suite need to be changes and some
eliminated entirely as they test for functionality that no longer exists.

During the testing of this feature, each and every mtr test failure was closely
scruitinized to ensure that the failure was a legitimate and expected change
in behavior. This caused a lot of back-and-forth debugging and fixing to ensure
that the resulting server behavior and mtr test cases were 100% as described in
the new behavior above.

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) wrote :
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

How much does the 5.6 fix differ from the 5.5 one?

review: Needs Information
Revision history for this message
George Ormond Lorch III (gl-az) wrote :

5.6 fix needs some additional calls made to decide_logging_format as that determination seems to not be getting called from all the same places in 5.6 as it was in 5.5. There is also some code in 5.6 that has moved files.

On issue that I am trying to figure out now that is a different behavior from 5.5 is in the rpl_stm_innodb.test. Specifically, consider this sequence loosely copied from the pre-merge result file:

CREATE DATABASE mysqltest1;
CREATE TEMPORARY TABLE mysqltest1.tmp (f1 BIGINT);
CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE="InnoDB";
SET AUTOCOMMIT = 0;
-------- switch to slave --------
ALTER TABLE mysqltest1.t1 ENGINE = MyISAM;
-------- switch to master --------
INSERT INTO mysqltest1.t1 SET f1= 1;
DROP TEMPORARY TABLE mysqltest1.tmp;
ROLLBACK;
SELECT COUNT(*) FROM mysqltest1.t1;
COUNT(*)
0
INSERT INTO mysqltest1.t1 SET f1= 2;
CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT);
ROLLBACK;
SELECT COUNT(*) FROM mysqltest1.t1;
COUNT(*)
0
-------- switch to slave --------
SELECT COUNT(*) FROM mysqltest1.t1;
COUNT(*)
2

The 'SELECT COUNT(*) FROM mysqltest1.t1;' on the slave is now returning one row.

What is happening is that this sequence:
INSERT INTO mysqltest1.t1 SET f1= 2;
CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT);
ROLLBACK;

Is not getting binlogged at all where I believe, according to the rest of the test, the INSERT should be getting binlogged. Something about the 'CREATE TEMPORARY TABLE' -> 'ROLLBACK' sequence seems to be tossing the entire transaction.

This is going to take a bit to figure out...

Revision history for this message
George Ormond Lorch III (gl-az) wrote :

Actually, I think I might have found a bug...

According to https://dev.mysql.com/doc/refman/5.6/en/implicit-commit.html: "CREATE TABLE and DROP TABLE statements do not commit a transaction if the TEMPORARY keyword is used..."

If I am understanding the test case and what the docs state, neither of the inserts should have been binlogged and propagated to the slave as at no point should the transaction be committed, either implicitly or explicitly, right?

Revision history for this message
George Ormond Lorch III (gl-az) wrote :

OK, issues are understood a bit, test cases split and all systems look good. There was one hangup in 5.6 where the behavior changed a bit from 5.5 and that is when transactional and non-transactional statements are used within a single transaction, and more specifically, when CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE are used with a transactional statement in a specific order. This manifested itself in rpl_stm_innodb.test (which is actually tests MBR ant just SBR). This test had to be split into rpl_stm and rpl_mix for a slight difference in the result.

Jenkins results here: http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/745/

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mysql-test/extra/binlog_tests/drop_temp_table.test'
2--- mysql-test/extra/binlog_tests/drop_temp_table.test 2010-06-29 10:54:58 +0000
3+++ mysql-test/extra/binlog_tests/drop_temp_table.test 2014-10-25 19:41:47 +0000
4@@ -20,6 +20,7 @@
5 # In RBR, 'DROP TEMPORARY TABLE ...' statement should never be binlogged no
6 # matter if the tables exist or not. In contrast, both in SBR and MBR, the
7 # statement should be always binlogged no matter if the tables exist or not.
8+# In MBR though, it will always be binlogged with IF EXISTS.
9 ##############################################################################
10 CREATE TEMPORARY TABLE tmp(c1 int);
11 CREATE TEMPORARY TABLE tmp1(c1 int);
12
13=== renamed file 'mysql-test/suite/binlog/t/binlog_tmp_table.test' => 'mysql-test/extra/binlog_tests/tmp_table.test'
14--- mysql-test/suite/binlog/t/binlog_tmp_table.test 2011-12-20 09:45:10 +0000
15+++ mysql-test/extra/binlog_tests/tmp_table.test 2014-10-25 19:41:47 +0000
16@@ -26,7 +26,6 @@
17 # BUG#35583 mysqlbinlog replay fails with ERROR 1146 when temp tables are used
18 #
19 source include/have_log_bin.inc;
20-source include/have_binlog_format_mixed_or_statement.inc;
21
22 RESET MASTER;
23
24
25=== renamed file 'mysql-test/suite/rpl/t/rpl_drop_temp.test' => 'mysql-test/extra/rpl_tests/rpl_drop_temp.test'
26--- mysql-test/suite/rpl/t/rpl_drop_temp.test 2014-06-04 14:48:06 +0000
27+++ mysql-test/extra/rpl_tests/rpl_drop_temp.test 2014-10-25 19:41:47 +0000
28@@ -5,9 +5,6 @@
29 # Purpose: According to TU in 16552 This is how
30 # to work around NDB's issue with temp tables
31 ##############################################
32---source include/not_gtid_enabled.inc
33-source include/master-slave.inc;
34-source include/have_binlog_format_mixed_or_statement.inc;
35
36 --disable_warnings
37 create database if not exists mysqltest;
38@@ -95,4 +92,3 @@
39 DROP TABLE t1;
40
41 # End of 4.1 tests
42---source include/rpl_end.inc
43
44=== modified file 'mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test'
45--- mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test 2014-06-04 14:48:06 +0000
46+++ mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test 2014-10-25 19:41:47 +0000
47@@ -366,7 +366,7 @@
48 {
49 let $cmd= CREATE TEMPORARY TABLE tt_xx (a int);
50 let $in_temporary= yes;
51- # In SBR and MIXED modes, the DDL statement is written to the binary log but
52+ # In SBR mode, the DDL statement is written to the binary log but
53 # does not commit the current transaction.
54 #
55 # 1: BEGIN
56@@ -382,10 +382,21 @@
57 # 3: ROW EVENT
58 # 4: COMMIT
59 #
60- if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'` )
61+ # In MIXED mode, the DDL statement is not written to the binary log and
62+ # does not commit the current transaction.
63+ #
64+ # 1: BEGIN
65+ # 2: INSERT
66+ # 3: COMMIT
67+ #
68+ if (`select @@binlog_format = 'STATEMENT'` )
69 {
70 let $commit_event_row_number= 4;
71 }
72+ if (`select @@binlog_format = 'MIXED'` )
73+ {
74+ let $commit_event_row_number= 3;
75+ }
76 #
77 # In NDB (RBR mode), the commit event is the sixth event
78 # in the binary log:
79@@ -427,14 +438,15 @@
80 # In MIXED mode, the changes are logged as rows and we have what follows:
81 #
82 # 1: BEGIN
83- # 2: TABLE MAP EVENT
84- # 3: ROW EVENT
85- # 4: COMMIT
86- # 5: DDL EVENT which triggered the previous commmit.
87+ # 2: ROW EVENT
88+ # 3: COMMIT
89 #
90 if (`select @@binlog_format = 'MIXED'`)
91 {
92- let $commit_event_row_number= 4;
93+ # Since this alter is done on a temp table in MIXED, it will not be
94+ # binlogged at all, so explicitly commit.
95+ let $in_temporary= yes;
96+ let $commit_event_row_number= 3;
97 }
98 #
99 # In NDB (RBR and MIXED modes), the commit event is the sixth event
100@@ -459,14 +471,15 @@
101 # In MIXED mode, the changes are logged as rows and we have what follows:
102 #
103 # 1: BEGIN
104- # 2: TABLE MAP EVENT
105- # 3: ROW EVENT
106- # 4: COMMIT
107- # 5: DDL EVENT which triggered the previous commmit.
108+ # 2: ROW EVENT
109+ # 3: COMMIT
110 #
111 if (`select @@binlog_format = 'MIXED'`)
112- {
113- let $commit_event_row_number= 4;
114+ {
115+ # Since this alter is done on a temp table in MIXED, it will not be
116+ # binlogged at all, so explicitly commit.
117+ let $in_temporary= yes;
118+ let $commit_event_row_number= 3;
119 }
120 #
121 # In NDB (RBR and MIXED modes), the commit event is the sixth event
122@@ -511,7 +524,7 @@
123 {
124 let $commit_event_row_number= 4;
125 }
126- # In MIXED mode, the changes are logged as rows and we have what follows:
127+ # In ROW mode, the changes are logged as rows and we have what follows:
128 #
129 # 1: BEGIN
130 # 2: TABLE MAP EVENT
131@@ -519,10 +532,22 @@
132 # 4: DROP TEMPORARY table IF EXISTS
133 # 5: COMMIT
134 #
135- if (`select @@binlog_format = 'MIXED' || @@binlog_format = 'ROW'`)
136+ if (`select @@binlog_format = 'ROW'`)
137 {
138 let $commit_event_row_number= 5;
139 }
140+ # In MIXED mode, the changes are logged as rows and we have what follows:
141+ #
142+ # 1: BEGIN
143+ # 2: ROW EVENT
144+ # 3: DROP TEMPORARY table IF EXISTS
145+ # 4: COMMIT
146+ #
147+ if (`select @@binlog_format = 'MIXED'`)
148+ {
149+ let $commit_event_row_number= 4;
150+ }
151+
152 #
153 # In NDB (RBR and MIXED modes), the commit event is the sixth event
154 # in the binary log:
155
156=== modified file 'mysql-test/extra/rpl_tests/rpl_innodb.test'
157--- mysql-test/extra/rpl_tests/rpl_innodb.test 2013-09-26 19:59:56 +0000
158+++ mysql-test/extra/rpl_tests/rpl_innodb.test 2014-10-25 19:41:47 +0000
159@@ -107,7 +107,12 @@
160 SHOW CREATE TABLE mysqltest1.tmp;
161 --error ER_NO_SUCH_TABLE
162 SHOW CREATE TABLE mysqltest1.tmp2;
163---echo ######### t1 has two rows here: the transaction not rolled back since t1 uses MyISAM #########
164+# Aa a result of the bugfix for 1313901, t1 has one row here since the
165+# CREATE TEMPORARY TABLE tmp2 above is not binlogged and thus changes the
166+# transactional/non-transactional logic, causing the INSERT f1=2 to not be bilogged
167+# on ROLLBACK
168+--echo ######### for SBR, t1 has two rows here: the transaction not rolled back since t1 uses MyISAM #########
169+--echo ######### for MBR, t1 has one row here: the transaction not rolled back since t1 uses MyISAM #########
170 SELECT COUNT(*) FROM mysqltest1.t1;
171 FLUSH LOGS;
172
173
174=== renamed file 'mysql-test/suite/rpl/t/rpl_rewrt_db.test' => 'mysql-test/extra/rpl_tests/rpl_rewrt_db.test'
175--- mysql-test/suite/rpl/t/rpl_rewrt_db.test 2014-06-04 14:48:06 +0000
176+++ mysql-test/extra/rpl_tests/rpl_rewrt_db.test 2014-10-25 19:41:47 +0000
177@@ -1,6 +1,5 @@
178+
179 # TBF - difference in row level logging
180--- source include/have_binlog_format_mixed_or_statement.inc
181--- source include/master-slave.inc
182
183 --disable_warnings
184 drop database if exists mysqltest1;
185@@ -254,4 +253,3 @@
186 --source include/sync_slave_sql_with_master.inc
187
188 # end of 5.0 tests
189---source include/rpl_end.inc
190
191=== modified file 'mysql-test/suite/binlog/r/binlog_database.result'
192--- mysql-test/suite/binlog/r/binlog_database.result 2013-12-16 08:45:31 +0000
193+++ mysql-test/suite/binlog/r/binlog_database.result 2014-10-25 19:41:47 +0000
194@@ -111,7 +111,6 @@
195 drop table tt1, t1;
196 include/show_binlog_events.inc
197 Log_name Pos Event_type Server_id End_log_pos Info
198-master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
199 master-bin.000001 # Query # # use `test`; create table t1 (a int)
200 master-bin.000001 # Query # # BEGIN
201 master-bin.000001 # Query # # use `test`; insert into t1 values (1)
202@@ -120,7 +119,7 @@
203 master-bin.000001 # Query # # BEGIN
204 master-bin.000001 # Query # # use `test`; insert into t1 values (1)
205 master-bin.000001 # Query # # COMMIT
206-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt1` /* generated by server */
207+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt1` /* generated by server */
208 master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
209 FLUSH STATUS;
210
211
212=== removed file 'mysql-test/suite/binlog/r/binlog_format_switch_in_tmp_table.result'
213--- mysql-test/suite/binlog/r/binlog_format_switch_in_tmp_table.result 2010-01-26 09:41:15 +0000
214+++ mysql-test/suite/binlog/r/binlog_format_switch_in_tmp_table.result 1970-01-01 00:00:00 +0000
215@@ -1,78 +0,0 @@
216-SELECT @@SESSION.binlog_format;
217-@@SESSION.binlog_format
218-MIXED
219-CREATE TABLE t1 (a VARCHAR(100));
220-CREATE TEMPORARY TABLE t2 (a VARCHAR(100));
221-# Test allow switching @@SESSION.binlog_format from MIXED to STATEMENT
222-# when there are open temp tables and we are logging in statement based format.
223-SET SESSION binlog_format = STATEMENT;
224-SELECT @@SESSION.binlog_format;
225-@@SESSION.binlog_format
226-STATEMENT
227-# Test allow switching @@SESSION.binlog_format from STATEMENT to
228-# STATEMENT when there are open temp tables.
229-SET SESSION binlog_format = STATEMENT;
230-SELECT @@SESSION.binlog_format;
231-@@SESSION.binlog_format
232-STATEMENT
233-INSERT INTO t1 VALUES ('statement based');
234-SELECT @@SESSION.binlog_format;
235-@@SESSION.binlog_format
236-STATEMENT
237-# Test allow switching @@SESSION.binlog_format from STATEMENT to
238-# MIXED when there are open temp tables.
239-SET SESSION binlog_format = MIXED;
240-SELECT @@SESSION.binlog_format;
241-@@SESSION.binlog_format
242-MIXED
243-# Test allow switching @@SESSION.binlog_format from MIXED to MIXED
244-# when there are open temp tables.
245-SET SESSION binlog_format = MIXED;
246-SELECT @@SESSION.binlog_format;
247-@@SESSION.binlog_format
248-MIXED
249-INSERT INTO t2 VALUES (UUID());
250-SELECT @@SESSION.binlog_format;
251-@@SESSION.binlog_format
252-MIXED
253-# Test forbit switching @@SESSION.binlog_format from MIXED to STATEMENT
254-# when there are open temp tables and we are logging in row based format.
255-SET SESSION binlog_format = STATEMENT;
256-ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables
257-SELECT @@SESSION.binlog_format;
258-@@SESSION.binlog_format
259-MIXED
260-SET SESSION binlog_format = ROW;
261-SELECT @@SESSION.binlog_format;
262-@@SESSION.binlog_format
263-ROW
264-INSERT INTO t1 VALUES ('row based');
265-# Test allow switching @@SESSION.binlog_format from ROW to MIXED
266-# when there are open temp tables.
267-SET SESSION binlog_format = MIXED;
268-SELECT @@SESSION.binlog_format;
269-@@SESSION.binlog_format
270-MIXED
271-INSERT INTO t1 VALUES ('row based');
272-# Test allow switching @@SESSION.binlog_format from MIXED to ROW
273-# when there are open temp tables.
274-SET SESSION binlog_format = ROW;
275-SELECT @@SESSION.binlog_format;
276-@@SESSION.binlog_format
277-ROW
278-# Test allow switching @@SESSION.binlog_format from ROW to ROW
279-# when there are open temp tables.
280-SET SESSION binlog_format = ROW;
281-SELECT @@SESSION.binlog_format;
282-@@SESSION.binlog_format
283-ROW
284-INSERT INTO t1 VALUES ('row based');
285-# Test forbit switching @@SESSION.binlog_format from ROW to STATEMENT
286-# when there are open temp tables.
287-SET SESSION binlog_format = STATEMENT;
288-ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables
289-SELECT @@SESSION.binlog_format;
290-@@SESSION.binlog_format
291-ROW
292-DROP TEMPORARY TABLE t2;
293-DROP TABLE t1;
294
295=== added file 'mysql-test/suite/binlog/r/binlog_mix_drop_tmp_tbl.result'
296--- mysql-test/suite/binlog/r/binlog_mix_drop_tmp_tbl.result 1970-01-01 00:00:00 +0000
297+++ mysql-test/suite/binlog/r/binlog_mix_drop_tmp_tbl.result 2014-10-25 19:41:47 +0000
298@@ -0,0 +1,56 @@
299+DROP DATABASE IF EXISTS `drop-temp+table-test`;
300+RESET MASTER;
301+CREATE DATABASE `drop-temp+table-test`;
302+USE `drop-temp+table-test`;
303+CREATE TEMPORARY TABLE shortn1 (a INT);
304+CREATE TEMPORARY TABLE `table:name` (a INT);
305+CREATE TEMPORARY TABLE shortn2 (a INT);
306+CREATE TEMPORARY TABLE tmp(c1 int);
307+CREATE TEMPORARY TABLE tmp1(c1 int);
308+CREATE TEMPORARY TABLE tmp2(c1 int);
309+CREATE TEMPORARY TABLE tmp3(c1 int);
310+CREATE TABLE t(c1 int);
311+DROP TEMPORARY TABLE IF EXISTS tmp;
312+DROP TEMPORARY TABLE IF EXISTS tmp;
313+DROP TEMPORARY TABLE IF EXISTS tmp, tmp1;
314+DROP TEMPORARY TABLE tmp3;
315+DROP TABLE IF EXISTS tmp2, t;
316+DROP TABLE IF EXISTS tmp2, t;
317+SELECT GET_LOCK("a",10);
318+GET_LOCK("a",10)
319+1
320+USE test;
321+SELECT GET_LOCK("a",10);
322+GET_LOCK("a",10)
323+1
324+include/show_binlog_events.inc
325+Log_name Pos Event_type Server_id End_log_pos Info
326+master-bin.000001 # Query # # CREATE DATABASE `drop-temp+table-test`
327+master-bin.000001 # Query # # use `drop-temp+table-test`; CREATE TABLE t(c1 int)
328+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
329+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
330+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp1`,`drop-temp+table-test`.`tmp` /* generated by server */
331+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp3` /* generated by server */
332+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp2` /* generated by server */
333+master-bin.000001 # Query # # use `drop-temp+table-test`; DROP TABLE IF EXISTS `t` /* generated by server */
334+master-bin.000001 # Query # # use `drop-temp+table-test`; DROP TABLE IF EXISTS `tmp2`,`t` /* generated by server */
335+master-bin.000001 # Query # # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `shortn2`,`table:name`,`shortn1`
336+DROP DATABASE `drop-temp+table-test`;
337+RESET MASTER;
338+CREATE TABLE t1 ( i text );
339+CREATE TEMPORARY TABLE ttmp1 ( i text );
340+SET @@session.binlog_format=ROW;
341+INSERT INTO t1 VALUES ('1');
342+SELECT @@session.binlog_format;
343+@@session.binlog_format
344+ROW
345+include/show_binlog_events.inc
346+Log_name Pos Event_type Server_id End_log_pos Info
347+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 ( i text )
348+master-bin.000001 # Query # # BEGIN
349+master-bin.000001 # Table_map # # table_id: # (test.t1)
350+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
351+master-bin.000001 # Query # # COMMIT
352+master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1`
353+RESET MASTER;
354+DROP TABLE t1;
355
356=== added file 'mysql-test/suite/binlog/r/binlog_mix_tmp_table.result'
357--- mysql-test/suite/binlog/r/binlog_mix_tmp_table.result 1970-01-01 00:00:00 +0000
358+++ mysql-test/suite/binlog/r/binlog_mix_tmp_table.result 2014-10-25 19:41:47 +0000
359@@ -0,0 +1,44 @@
360+RESET MASTER;
361+create table foo (a int);
362+flush logs;
363+create temporary table tmp1_foo like foo;
364+create temporary table tmp2_foo (a int);
365+insert into tmp1_foo values (1), (2), (3), (4);
366+replace into tmp2_foo values (1), (2), (3), (4);
367+update tmp1_foo set a=2*a-1;
368+update tmp2_foo set a=2*a;
369+delete from tmp1_foo where a < 5;
370+delete from tmp2_foo where a < 5;
371+insert into foo select * from tmp1_foo;
372+insert into foo select * from tmp2_foo;
373+truncate table tmp1_foo;
374+truncate table tmp2_foo;
375+flush logs;
376+select * from foo;
377+a
378+5
379+7
380+6
381+8
382+drop table foo;
383+create table foo (a int);
384+RESET MASTER;
385+select * from foo;
386+a
387+5
388+7
389+6
390+8
391+drop table foo;
392+RESET MASTER;
393+create database b51226;
394+use b51226;
395+create temporary table t1(i int);
396+use b51226;
397+create temporary table t1(i int);
398+create temporary table t1(i int);
399+ERROR 42S01: Table 't1' already exists
400+insert into t1 values(1);
401+DROP DATABASE b51226;
402+FLUSH LOGS;
403+RESET MASTER;
404
405=== added file 'mysql-test/suite/binlog/r/binlog_row_tmp_table.result'
406--- mysql-test/suite/binlog/r/binlog_row_tmp_table.result 1970-01-01 00:00:00 +0000
407+++ mysql-test/suite/binlog/r/binlog_row_tmp_table.result 2014-10-25 19:41:47 +0000
408@@ -0,0 +1,44 @@
409+RESET MASTER;
410+create table foo (a int);
411+flush logs;
412+create temporary table tmp1_foo like foo;
413+create temporary table tmp2_foo (a int);
414+insert into tmp1_foo values (1), (2), (3), (4);
415+replace into tmp2_foo values (1), (2), (3), (4);
416+update tmp1_foo set a=2*a-1;
417+update tmp2_foo set a=2*a;
418+delete from tmp1_foo where a < 5;
419+delete from tmp2_foo where a < 5;
420+insert into foo select * from tmp1_foo;
421+insert into foo select * from tmp2_foo;
422+truncate table tmp1_foo;
423+truncate table tmp2_foo;
424+flush logs;
425+select * from foo;
426+a
427+5
428+7
429+6
430+8
431+drop table foo;
432+create table foo (a int);
433+RESET MASTER;
434+select * from foo;
435+a
436+5
437+7
438+6
439+8
440+drop table foo;
441+RESET MASTER;
442+create database b51226;
443+use b51226;
444+create temporary table t1(i int);
445+use b51226;
446+create temporary table t1(i int);
447+create temporary table t1(i int);
448+ERROR 42S01: Table 't1' already exists
449+insert into t1 values(1);
450+DROP DATABASE b51226;
451+FLUSH LOGS;
452+RESET MASTER;
453
454=== modified file 'mysql-test/suite/binlog/r/binlog_stm_binlog.result'
455--- mysql-test/suite/binlog/r/binlog_stm_binlog.result 2012-08-22 01:40:20 +0000
456+++ mysql-test/suite/binlog/r/binlog_stm_binlog.result 2014-10-25 19:41:47 +0000
457@@ -343,9 +343,7 @@
458 COERCIBILITY(s1) d3;
459 DROP TEMPORARY TABLE tmp1;
460 END
461-master-bin.000001 # Query # # use `bug39182`; CREATE TEMPORARY TABLE tmp1
462-SELECT * FROM t1 WHERE a LIKE CONCAT("%", NAME_CONST('s1',_utf8'test' COLLATE 'utf8_unicode_ci'), "%")
463-master-bin.000001 # Query # # use `bug39182`; DROP TEMPORARY TABLE `tmp1` /* generated by server */
464+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `bug39182`.`tmp1` /* generated by server */
465 DROP PROCEDURE p1;
466 DROP TABLE t1;
467 DROP DATABASE bug39182;
468@@ -412,8 +410,9 @@
469 master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
470 master-bin.000001 # Query # # use `test`; create table t1 (a int)
471 master-bin.000001 # Query # # use `test`; create table if not exists t2 select * from t1
472-master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
473-master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1
474+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
475+ `a` int(11) DEFAULT NULL
476+)
477 master-bin.000001 # Query # # BEGIN
478 master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test')
479 master-bin.000001 # Query # # COMMIT
480@@ -445,8 +444,9 @@
481 master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
482 master-bin.000001 # Query # # use `test`; create table t1 (a int)
483 master-bin.000001 # Query # # use `test`; create table if not exists t2 select * from t1
484-master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
485-master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1
486+master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
487+ `a` int(11) DEFAULT NULL
488+)
489 master-bin.000001 # Query # # BEGIN
490 master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test')
491 master-bin.000001 # Query # # COMMIT
492@@ -456,7 +456,7 @@
493 master-bin.000001 # Query # # BEGIN
494 master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
495 master-bin.000001 # Query # # COMMIT
496-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt1` /* generated by server */
497+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt1` /* generated by server */
498 master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */
499 master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
500 master-bin.000001 # Query # # BEGIN
501
502=== renamed file 'mysql-test/suite/binlog/r/binlog_tmp_table.result' => 'mysql-test/suite/binlog/r/binlog_stm_tmp_table.result'
503=== removed file 'mysql-test/suite/binlog/t/binlog_format_switch_in_tmp_table.test'
504--- mysql-test/suite/binlog/t/binlog_format_switch_in_tmp_table.test 2010-01-26 09:41:15 +0000
505+++ mysql-test/suite/binlog/t/binlog_format_switch_in_tmp_table.test 1970-01-01 00:00:00 +0000
506@@ -1,76 +0,0 @@
507-#
508-# Bug #45855 row events in binlog after switch from binlog_fmt=mix to stmt with open tmp tbl
509-# Bug #45856 can't switch from binlog_format=row to mix with open tmp tbl
510-# This test verfies if the program will generate ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
511-# error and forbid switching @@SESSION.binlog_format from MIXED or ROW to
512-# STATEMENT when there are open temp tables and we are logging in row format.
513-# There is no error in any other case.
514-#
515-
516-source include/have_binlog_format_mixed.inc;
517-
518-SELECT @@SESSION.binlog_format;
519-CREATE TABLE t1 (a VARCHAR(100));
520-CREATE TEMPORARY TABLE t2 (a VARCHAR(100));
521-
522---echo # Test allow switching @@SESSION.binlog_format from MIXED to STATEMENT
523---echo # when there are open temp tables and we are logging in statement based format.
524-SET SESSION binlog_format = STATEMENT;
525-SELECT @@SESSION.binlog_format;
526-
527---echo # Test allow switching @@SESSION.binlog_format from STATEMENT to
528---echo # STATEMENT when there are open temp tables.
529-SET SESSION binlog_format = STATEMENT;
530-SELECT @@SESSION.binlog_format;
531-
532-INSERT INTO t1 VALUES ('statement based');
533-SELECT @@SESSION.binlog_format;
534---echo # Test allow switching @@SESSION.binlog_format from STATEMENT to
535---echo # MIXED when there are open temp tables.
536-SET SESSION binlog_format = MIXED;
537-SELECT @@SESSION.binlog_format;
538-
539---echo # Test allow switching @@SESSION.binlog_format from MIXED to MIXED
540---echo # when there are open temp tables.
541-SET SESSION binlog_format = MIXED;
542-SELECT @@SESSION.binlog_format;
543-
544-INSERT INTO t2 VALUES (UUID());
545-SELECT @@SESSION.binlog_format;
546-
547---echo # Test forbit switching @@SESSION.binlog_format from MIXED to STATEMENT
548---echo # when there are open temp tables and we are logging in row based format.
549---ERROR ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
550-SET SESSION binlog_format = STATEMENT;
551-SELECT @@SESSION.binlog_format;
552-
553-SET SESSION binlog_format = ROW;
554-SELECT @@SESSION.binlog_format;
555-
556-INSERT INTO t1 VALUES ('row based');
557---echo # Test allow switching @@SESSION.binlog_format from ROW to MIXED
558---echo # when there are open temp tables.
559-SET SESSION binlog_format = MIXED;
560-SELECT @@SESSION.binlog_format;
561-
562-INSERT INTO t1 VALUES ('row based');
563---echo # Test allow switching @@SESSION.binlog_format from MIXED to ROW
564---echo # when there are open temp tables.
565-SET SESSION binlog_format = ROW;
566-SELECT @@SESSION.binlog_format;
567-
568---echo # Test allow switching @@SESSION.binlog_format from ROW to ROW
569---echo # when there are open temp tables.
570-SET SESSION binlog_format = ROW;
571-SELECT @@SESSION.binlog_format;
572-
573-INSERT INTO t1 VALUES ('row based');
574---echo # Test forbit switching @@SESSION.binlog_format from ROW to STATEMENT
575---echo # when there are open temp tables.
576---ERROR ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
577-SET SESSION binlog_format = STATEMENT;
578-SELECT @@SESSION.binlog_format;
579-
580-DROP TEMPORARY TABLE t2;
581-DROP TABLE t1;
582-
583
584=== added file 'mysql-test/suite/binlog/t/binlog_mix_drop_tmp_tbl.test'
585--- mysql-test/suite/binlog/t/binlog_mix_drop_tmp_tbl.test 1970-01-01 00:00:00 +0000
586+++ mysql-test/suite/binlog/t/binlog_mix_drop_tmp_tbl.test 2014-10-25 19:41:47 +0000
587@@ -0,0 +1,4 @@
588+# This is a wrapper for binlog.test so that the same test case can be used
589+
590+-- source include/have_binlog_format_mixed.inc
591+-- source extra/binlog_tests/drop_temp_table.test
592
593=== added file 'mysql-test/suite/binlog/t/binlog_mix_tmp_table.test'
594--- mysql-test/suite/binlog/t/binlog_mix_tmp_table.test 1970-01-01 00:00:00 +0000
595+++ mysql-test/suite/binlog/t/binlog_mix_tmp_table.test 2014-10-25 19:41:47 +0000
596@@ -0,0 +1,2 @@
597+source include/have_binlog_format_mixed.inc;
598+source extra/binlog_tests/tmp_table.test;
599
600=== added file 'mysql-test/suite/binlog/t/binlog_row_tmp_table.test'
601--- mysql-test/suite/binlog/t/binlog_row_tmp_table.test 1970-01-01 00:00:00 +0000
602+++ mysql-test/suite/binlog/t/binlog_row_tmp_table.test 2014-10-25 19:41:47 +0000
603@@ -0,0 +1,2 @@
604+source include/have_binlog_format_row.inc;
605+source extra/binlog_tests/tmp_table.test;
606
607=== modified file 'mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test'
608--- mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test 2007-06-27 12:28:02 +0000
609+++ mysql-test/suite/binlog/t/binlog_stm_drop_tmp_tbl.test 2014-10-25 19:41:47 +0000
610@@ -1,5 +1,4 @@
611 # This is a wrapper for binlog.test so that the same test case can be used
612-# For both statement and row based bin logs 9/19/2005 [jbm]
613
614--- source include/have_binlog_format_mixed_or_statement.inc
615+-- source include/have_binlog_format_statement.inc
616 -- source extra/binlog_tests/drop_temp_table.test
617
618=== added file 'mysql-test/suite/binlog/t/binlog_stm_tmp_table.test'
619--- mysql-test/suite/binlog/t/binlog_stm_tmp_table.test 1970-01-01 00:00:00 +0000
620+++ mysql-test/suite/binlog/t/binlog_stm_tmp_table.test 2014-10-25 19:41:47 +0000
621@@ -0,0 +1,2 @@
622+source include/have_binlog_format_statement.inc;
623+source extra/binlog_tests/tmp_table.test;
624
625=== added file 'mysql-test/suite/rpl/r/rpl_bug58546.result'
626--- mysql-test/suite/rpl/r/rpl_bug58546.result 1970-01-01 00:00:00 +0000
627+++ mysql-test/suite/rpl/r/rpl_bug58546.result 2014-10-25 19:41:47 +0000
628@@ -0,0 +1,47 @@
629+include/master-slave.inc
630+Warnings:
631+Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
632+Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
633+[connection master]
634+
635+# Bug#58546 test rpl_packet timeout failure sporadically on PB
636+# ----------------------------------------------------------------------
637+# STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
638+# possible that IO thread stopped after replicating part of a transaction
639+# which SQL thread was executing. SQL thread would be hung if the
640+# transaction could not be rolled back safely.
641+# It caused some sporadic failures on PB2.
642+#
643+# This test verifies that when 'STOP SLAVE' is issued by a user, IO
644+# thread will continue to fetch the rest events of the transaction which
645+# is being executed by SQL thread and is not able to be rolled back safely.
646+CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
647+CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
648+INSERT INTO t1 VALUES(1, 1);
649+[connection master]
650+SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
651+[connection slave]
652+include/restart_slave.inc
653+BEGIN;
654+UPDATE t1 SET c2 = 2 WHERE c1 = 1;
655+[connection master]
656+BEGIN;
657+INSERT INTO t1 VALUES(2, 2);
658+INSERT INTO t2 VALUES(1);
659+UPDATE t1 SET c2 = 3 WHERE c1 = 1;
660+COMMIT;
661+[connection slave1]
662+STOP SLAVE;
663+[connection slave]
664+ROLLBACK;
665+[connection master]
666+SET DEBUG_SYNC= 'now SIGNAL signal.continue';
667+SET DEBUG_SYNC= 'RESET';
668+[connection slave]
669+include/wait_for_slave_to_stop.inc
670+[connection slave1]
671+include/start_slave.inc
672+[connection master]
673+DROP TABLE t1, t2;
674+SET GLOBAL debug= $debug_save;
675+include/rpl_end.inc
676
677=== modified file 'mysql-test/suite/rpl/r/rpl_gtid_empty_transaction.result'
678--- mysql-test/suite/rpl/r/rpl_gtid_empty_transaction.result 2014-06-04 14:48:06 +0000
679+++ mysql-test/suite/rpl/r/rpl_gtid_empty_transaction.result 2014-10-25 19:41:47 +0000
680@@ -26,7 +26,7 @@
681 ALTER TABLE t_ignore_wild ADD COLUMN b INT;
682 INSERT INTO t_ignore_wild VALUES (1, 2);
683 DROP TEMPORARY TABLE t_ignore_wild;
684-include/gtid_step_assert.inc [count=8, only_count=0]
685+include/gtid_step_assert.inc [count=2, only_count=0]
686 include/rpl_sync.inc
687 ==== Case 1C: database filters on slave applier ====
688 include/gtid_step_reset.inc
689@@ -64,7 +64,7 @@
690 CREATE TEMPORARY TABLE t2 (a INT);
691 ALTER TABLE t2 ADD COLUMN b INT;
692 INSERT INTO t2 VALUES (1, 2);
693-include/gtid_step_assert.inc [count=3, only_count=0]
694+include/gtid_step_assert.inc [count=0, only_count=0]
695 include/rpl_sync.inc
696 ---- Clean up ----
697 DROP TEMPORARY TABLE t2;
698
699=== added file 'mysql-test/suite/rpl/r/rpl_mix_drop_temp.result'
700--- mysql-test/suite/rpl/r/rpl_mix_drop_temp.result 1970-01-01 00:00:00 +0000
701+++ mysql-test/suite/rpl/r/rpl_mix_drop_temp.result 2014-10-25 19:41:47 +0000
702@@ -0,0 +1,43 @@
703+include/master-slave.inc
704+Warnings:
705+Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
706+Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
707+[connection master]
708+create database if not exists mysqltest;
709+use mysqltest;
710+create temporary table mysqltest.t1 (n int)ENGINE=MyISAM;
711+create temporary table mysqltest.t2 (n int)ENGINE=MyISAM;
712+show status like 'Slave_open_temp_tables';
713+Variable_name Value
714+Slave_open_temp_tables 0
715+drop database mysqltest;
716+DROP TEMPORARY TABLE IF EXISTS tmp1;
717+Warnings:
718+Note 1051 Unknown table 'test.tmp1'
719+CREATE TEMPORARY TABLE t1 ( a int );
720+DROP TEMPORARY TABLE t1, t2;
721+ERROR 42S02: Unknown table 'test.t2'
722+DROP TEMPORARY TABLE tmp2;
723+ERROR 42S02: Unknown table 'test.tmp2'
724+stop slave;
725+**** On Master ****
726+CREATE TEMPORARY TABLE tmp3 (a int);
727+DROP TEMPORARY TABLE tmp3;
728+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
729+START SLAVE;
730+include/rpl_reset.inc
731+CREATE TABLE t1 ( i INT );
732+SHOW STATUS LIKE 'Slave_open_temp_tables';
733+Variable_name Value
734+Slave_open_temp_tables 0
735+CREATE TEMPORARY TABLE ttmp1 ( i INT );
736+SET SESSION binlog_format=ROW;
737+SHOW STATUS LIKE 'Slave_open_temp_tables';
738+Variable_name Value
739+Slave_open_temp_tables 0
740+include/show_binlog_events.inc
741+Log_name Pos Event_type Server_id End_log_pos Info
742+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 ( i INT )
743+master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1`
744+DROP TABLE t1;
745+include/rpl_end.inc
746
747=== added file 'mysql-test/suite/rpl/r/rpl_mix_innodb.result'
748--- mysql-test/suite/rpl/r/rpl_mix_innodb.result 1970-01-01 00:00:00 +0000
749+++ mysql-test/suite/rpl/r/rpl_mix_innodb.result 2014-10-25 19:41:47 +0000
750@@ -0,0 +1,138 @@
751+include/master-slave.inc
752+Warnings:
753+Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
754+Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
755+[connection master]
756+CREATE TABLE t4 (
757+id INT(5) unsigned NOT NULL auto_increment,
758+name varchar(15) NOT NULL default '',
759+number varchar(35) NOT NULL default 'default',
760+PRIMARY KEY (id),
761+UNIQUE KEY unique_rec (name,number)
762+) ENGINE=InnoDB;
763+LOAD DATA
764+INFILE '../../std_data/loaddata_pair.dat'
765+REPLACE INTO TABLE t4
766+(name,number);
767+SELECT * FROM t4;
768+id name number
769+1 XXX 12345
770+2 XXY 12345
771+SELECT * FROM t4;
772+id name number
773+1 XXX 12345
774+2 XXY 12345
775+LOAD DATA
776+INFILE '../../std_data/loaddata_pair.dat'
777+REPLACE INTO TABLE t4
778+(name,number);
779+SELECT * FROM t4;
780+id name number
781+4 XXX 12345
782+5 XXY 12345
783+SELECT * FROM t4;
784+id name number
785+4 XXX 12345
786+5 XXY 12345
787+FLUSH LOGS;
788+FLUSH LOGS;
789+DROP DATABASE IF EXISTS mysqltest1;
790+CREATE DATABASE mysqltest1;
791+CREATE TEMPORARY TABLE mysqltest1.tmp (f1 BIGINT);
792+CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE="InnoDB";
793+SET AUTOCOMMIT = 0;
794+-------- switch to slave --------
795+ALTER TABLE mysqltest1.t1 ENGINE = MyISAM;
796+SHOW CREATE TABLE mysqltest1.t1;
797+Table Create Table
798+t1 CREATE TABLE `t1` (
799+ `f1` bigint(20) DEFAULT NULL
800+) ENGINE=MyISAM DEFAULT CHARSET=latin1
801+-------- switch to master --------
802+INSERT INTO mysqltest1.t1 SET f1= 1;
803+DROP TEMPORARY TABLE mysqltest1.tmp;
804+ROLLBACK;
805+Warnings:
806+Warning # Some temporary tables were dropped, but these operations could not be rolled back.
807+SHOW CREATE TABLE mysqltest1.tmp;
808+ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist
809+######### Must return no rows here #########
810+SELECT COUNT(*) FROM mysqltest1.t1;
811+COUNT(*)
812+0
813+INSERT INTO mysqltest1.t1 SET f1= 2;
814+CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT);
815+ROLLBACK;
816+Warnings:
817+Warning # The creation of some temporary tables could not be rolled back.
818+SHOW CREATE TABLE mysqltest1.tmp2;
819+Table Create Table
820+tmp2 CREATE TEMPORARY TABLE `tmp2` (
821+ `a` int(11) DEFAULT NULL
822+) ENGINE=InnoDB DEFAULT CHARSET=latin1
823+######### Must return no rows here #########
824+SELECT COUNT(*) FROM mysqltest1.t1;
825+COUNT(*)
826+0
827+-------- switch to slave --------
828+SHOW CREATE TABLE mysqltest1.tmp;
829+ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist
830+SHOW CREATE TABLE mysqltest1.tmp2;
831+ERROR 42S02: Table 'mysqltest1.tmp2' doesn't exist
832+######### for SBR, t1 has two rows here: the transaction not rolled back since t1 uses MyISAM #########
833+######### for MBR, t1 has one row here: the transaction not rolled back since t1 uses MyISAM #########
834+SELECT COUNT(*) FROM mysqltest1.t1;
835+COUNT(*)
836+1
837+FLUSH LOGS;
838+-------- switch to master --------
839+FLUSH LOGS;
840+DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2;
841+DROP DATABASE mysqltest1;
842+End of 5.1 tests
843+#
844+# Bug#39675 rename tables on innodb tables with pending
845+# transactions causes slave data issue.
846+#
847+DROP TABLE IF EXISTS t1;
848+DROP TABLE IF EXISTS t2;
849+DROP TABLE IF EXISTS t3;
850+CREATE TABLE t1 (
851+id INT PRIMARY KEY auto_increment,
852+b INT DEFAULT NULL
853+) ENGINE=InnoDB;
854+CREATE TABLE t2 (
855+id INT PRIMARY KEY auto_increment,
856+b INT DEFAULT NULL
857+) ENGINE=InnoDB;
858+INSERT INTO t1 (b) VALUES (1),(2),(3);
859+BEGIN;
860+INSERT INTO t1(b) VALUES (4);
861+-------- switch to master1 --------
862+RENAME TABLE t1 TO t3, t2 TO t1;;
863+-------- switch to master --------
864+COMMIT;
865+-------- switch to master1 --------
866+-------- switch to master --------
867+SELECT * FROM t1;
868+id b
869+SELECT * FROM t3;
870+id b
871+1 1
872+2 2
873+3 3
874+4 4
875+-------- switch to slave --------
876+SELECT * FROM t1;
877+id b
878+SELECT * FROM t3;
879+id b
880+1 1
881+2 2
882+3 3
883+4 4
884+-------- switch to master --------
885+DROP TABLE t1;
886+DROP TABLE t3;
887+End of 6.0 tests
888+include/rpl_end.inc
889
890=== added file 'mysql-test/suite/rpl/r/rpl_mix_rewrt_db.result'
891--- mysql-test/suite/rpl/r/rpl_mix_rewrt_db.result 1970-01-01 00:00:00 +0000
892+++ mysql-test/suite/rpl/r/rpl_mix_rewrt_db.result 2014-10-25 19:41:47 +0000
893@@ -0,0 +1,206 @@
894+include/master-slave.inc
895+Warnings:
896+Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
897+Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
898+[connection master]
899+drop database if exists mysqltest1;
900+create database mysqltest1;
901+use mysqltest1;
902+create table t1 (a int);
903+insert into t1 values(9);
904+select * from mysqltest1.t1;
905+a
906+9
907+include/sync_slave_sql_with_master.inc
908+show databases like 'mysqltest1';
909+Database (mysqltest1)
910+mysqltest1
911+select * from test.t1;
912+a
913+9
914+drop table t1;
915+drop database mysqltest1;
916+include/sync_slave_sql_with_master.inc
917+drop database if exists rewrite;
918+create database rewrite;
919+use test;
920+create table t1 (a date, b date, c date not null, d date);
921+load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',';
922+Warnings:
923+Warning 1265 Data truncated for column 'a' at row 1
924+Warning 1265 Data truncated for column 'c' at row 1
925+Warning 1265 Data truncated for column 'd' at row 1
926+Warning 1264 Out of range value for column 'a' at row 2
927+Warning 1264 Out of range value for column 'b' at row 2
928+Warning 1265 Data truncated for column 'd' at row 2
929+load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
930+include/sync_slave_sql_with_master.inc
931+select * from rewrite.t1;
932+a b c d
933+0000-00-00 NULL 0000-00-00 0000-00-00
934+0000-00-00 0000-00-00 0000-00-00 0000-00-00
935+2003-03-03 2003-03-03 2003-03-03 NULL
936+2003-03-03 2003-03-03 2003-03-03 NULL
937+truncate table t1;
938+load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
939+Warnings:
940+Warning 1265 Data truncated for column 'c' at row 1
941+Warning 1265 Data truncated for column 'd' at row 1
942+Warning 1264 Out of range value for column 'b' at row 2
943+Warning 1265 Data truncated for column 'd' at row 2
944+include/sync_slave_sql_with_master.inc
945+select * from rewrite.t1;
946+a b c d
947+NULL NULL 0000-00-00 0000-00-00
948+NULL 0000-00-00 0000-00-00 0000-00-00
949+NULL 2003-03-03 2003-03-03 NULL
950+drop table t1;
951+create table t1 (a text, b text);
952+load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
953+Warnings:
954+Warning 1261 Row 3 doesn't contain data for all columns
955+include/sync_slave_sql_with_master.inc
956+select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1;
957+concat('|',a,'|') concat('|',b,'|')
958+|Field A| |Field B|
959+|Field 1| |Field 2'
960+Field 3,'Field 4|
961+|Field 5' ,'Field 6| NULL
962+|Field 6| | 'Field 7'|
963+drop table t1;
964+create table t1 (a int, b char(10));
965+load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
966+Warnings:
967+Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
968+Warning 1262 Row 3 was truncated; it contained more data than there were input columns
969+Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 5
970+Warning 1262 Row 5 was truncated; it contained more data than there were input columns
971+include/sync_slave_sql_with_master.inc
972+select * from rewrite.t1;
973+a b
974+1 row 1
975+2 row 2
976+0 1234567890
977+3 row 3
978+0 1234567890
979+truncate table t1;
980+load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
981+Warnings:
982+Warning 1366 Incorrect integer value: '
983+' for column 'a' at row 4
984+Warning 1261 Row 4 doesn't contain data for all columns
985+include/sync_slave_sql_with_master.inc
986+select * from rewrite.t1;
987+a b
988+1 row 1
989+2 row 2
990+3 row 3
991+0
992+set sql_log_bin= 0;
993+drop database rewrite;
994+set sql_log_bin= 1;
995+set sql_log_bin= 0;
996+drop table t1;
997+set sql_log_bin= 1;
998+
999+****
1000+**** Bug #46861 Auto-closing of temporary tables broken by replicate-rewrite-db
1001+****
1002+
1003+****
1004+**** Preparing the environment
1005+****
1006+SET sql_log_bin= 0;
1007+CREATE DATABASE database_master_temp_01;
1008+CREATE DATABASE database_master_temp_02;
1009+CREATE DATABASE database_master_temp_03;
1010+SET sql_log_bin= 1;
1011+SET sql_log_bin= 0;
1012+CREATE DATABASE database_slave_temp_01;
1013+CREATE DATABASE database_slave_temp_02;
1014+CREATE DATABASE database_slave_temp_03;
1015+SET sql_log_bin= 1;
1016+
1017+****
1018+**** Creating temporary tables on different databases with different connections
1019+****
1020+**** con_temp_01 --> creates
1021+**** t_01_01_temp on database_master_temp_01
1022+****
1023+**** con_temp_02 --> creates
1024+**** t_01_01_temp on database_master_temp_01
1025+**** t_02_01_temp, t_02_02_temp on database_master_temp_02
1026+****
1027+**** con_temp_03 --> creates
1028+**** t_01_01_temp on database_master_temp_01
1029+**** t_02_01_temp, t_02_02_temp on database_master_temp_02
1030+**** t_03_01_temp, t_03_02_temp, t_03_03_temp on database_master_temp_03
1031+****
1032+
1033+con_temp_01
1034+
1035+USE database_master_temp_01;
1036+CREATE TEMPORARY TABLE t_01_01_temp(a int);
1037+INSERT INTO t_01_01_temp VALUES(1);
1038+
1039+con_temp_02
1040+
1041+USE database_master_temp_01;
1042+CREATE TEMPORARY TABLE t_01_01_temp(a int);
1043+INSERT INTO t_01_01_temp VALUES(1);
1044+USE database_master_temp_02;
1045+CREATE TEMPORARY TABLE t_02_01_temp(a int);
1046+INSERT INTO t_02_01_temp VALUES(1);
1047+CREATE TEMPORARY TABLE t_02_02_temp(a int);
1048+INSERT INTO t_02_02_temp VALUES(1);
1049+
1050+con_temp_03
1051+
1052+USE database_master_temp_01;
1053+CREATE TEMPORARY TABLE t_01_01_temp(a int);
1054+INSERT INTO t_01_01_temp VALUES(1);
1055+USE database_master_temp_02;
1056+CREATE TEMPORARY TABLE t_02_01_temp(a int);
1057+INSERT INTO t_02_01_temp VALUES(1);
1058+CREATE TEMPORARY TABLE t_02_02_temp(a int);
1059+INSERT INTO t_02_02_temp VALUES(1);
1060+USE database_master_temp_03;
1061+CREATE TEMPORARY TABLE t_03_01_temp(a int);
1062+INSERT INTO t_03_01_temp VALUES(1);
1063+CREATE TEMPORARY TABLE t_03_02_temp(a int);
1064+INSERT INTO t_03_02_temp VALUES(1);
1065+CREATE TEMPORARY TABLE t_03_03_temp(a int);
1066+INSERT INTO t_03_03_temp VALUES(1);
1067+
1068+**** Dropping the connections
1069+**** To be sure that the DROP statements have been logged, we make
1070+**** sure that the number of open temporary tables at slave becomes
1071+**** zero. If not,the test will time out.
1072+
1073+include/sync_slave_sql_with_master.inc
1074+show status like 'Slave_open_temp_tables';
1075+Variable_name Value
1076+Slave_open_temp_tables 0
1077+flush logs;
1078+
1079+**** Wait until number of open temporary tables at slave becomes zero
1080+
1081+
1082+**** Check if every drop temporary table command is prepended with "use"
1083+
1084+include/assert.inc [The number of drop temporary table events in binlog should be 6]
1085+****
1086+**** Cleaning up the test case
1087+****
1088+SET sql_log_bin= 0;
1089+DROP DATABASE database_master_temp_01;
1090+DROP DATABASE database_master_temp_02;
1091+DROP DATABASE database_master_temp_03;
1092+SET sql_log_bin= 1;
1093+SET sql_log_bin= 0;
1094+DROP DATABASE database_slave_temp_01;
1095+DROP DATABASE database_slave_temp_02;
1096+DROP DATABASE database_slave_temp_03;
1097+SET sql_log_bin= 1;
1098+include/sync_slave_sql_with_master.inc
1099+include/rpl_end.inc
1100
1101=== modified file 'mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result'
1102--- mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result 2014-08-22 10:02:24 +0000
1103+++ mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result 2014-10-25 19:41:47 +0000
1104@@ -66,7 +66,7 @@
1105 -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
1106 include/show_binlog_events.inc
1107 Log_name Pos Event_type Server_id End_log_pos Info
1108-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1109+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1110 -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
1111
1112 SET @commands= 'Drop-Temp-N-Temp';
1113@@ -74,7 +74,7 @@
1114 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-N-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1115 include/show_binlog_events.inc
1116 Log_name Pos Event_type Server_id End_log_pos Info
1117-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1118+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1119 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-N-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1120
1121 SET @commands= 'Drop-Temp-Xe-Temp';
1122@@ -100,7 +100,7 @@
1123 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1124 include/show_binlog_events.inc
1125 Log_name Pos Event_type Server_id End_log_pos Info
1126-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1127+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1128 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1129
1130 SET @commands= 'Drop-Temp-If-TXe-Temp';
1131@@ -119,7 +119,7 @@
1132 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1133 include/show_binlog_events.inc
1134 Log_name Pos Event_type Server_id End_log_pos Info
1135-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1136+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1137 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1138
1139 SET @commands= 'Drop-Temp-If-NXe-Temp';
1140@@ -137,8 +137,8 @@
1141 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1142 include/show_binlog_events.inc
1143 Log_name Pos Event_type Server_id End_log_pos Info
1144-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1145-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1146+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1147+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1148 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1149
1150 SET @commands= 'Drop-Temp-TT-Temp';
1151@@ -146,7 +146,7 @@
1152 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TT-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1153 include/show_binlog_events.inc
1154 Log_name Pos Event_type Server_id End_log_pos Info
1155-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1`,`tt_tmp_2` /* generated by server */
1156+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1`,`test`.`tt_tmp_2` /* generated by server */
1157 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-TT-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1158
1159 SET @commands= 'Drop-Temp-NN-Temp';
1160@@ -154,7 +154,7 @@
1161 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1162 include/show_binlog_events.inc
1163 Log_name Pos Event_type Server_id End_log_pos Info
1164-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1165+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1166 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-NN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1167
1168
1169@@ -171,7 +171,7 @@
1170 Log_name Pos Event_type Server_id End_log_pos Info
1171 master-bin.000001 # Query # # BEGIN
1172 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1173-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1174+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1175 master-bin.000001 # Xid # # COMMIT /* XID */
1176 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1177
1178@@ -190,8 +190,8 @@
1179 master-bin.000001 # Query # # COMMIT
1180 master-bin.000001 # Query # # BEGIN
1181 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1182-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1183-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1184+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1185+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1186 master-bin.000001 # Xid # # COMMIT /* XID */
1187 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1188
1189@@ -204,7 +204,7 @@
1190 include/show_binlog_events.inc
1191 Log_name Pos Event_type Server_id End_log_pos Info
1192 master-bin.000001 # Query # # BEGIN
1193-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1194+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1195 master-bin.000001 # Query # # COMMIT
1196 master-bin.000001 # Query # # BEGIN
1197 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1198@@ -222,13 +222,13 @@
1199 include/show_binlog_events.inc
1200 Log_name Pos Event_type Server_id End_log_pos Info
1201 master-bin.000001 # Query # # BEGIN
1202-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1203+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1204 master-bin.000001 # Query # # COMMIT
1205 master-bin.000001 # Query # # BEGIN
1206 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1207 master-bin.000001 # Query # # COMMIT
1208 master-bin.000001 # Query # # BEGIN
1209-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /* generated by server */
1210+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /* generated by server */
1211 master-bin.000001 # Query # # COMMIT
1212 master-bin.000001 # Query # # BEGIN
1213 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1214@@ -320,7 +320,7 @@
1215 Log_name Pos Event_type Server_id End_log_pos Info
1216 master-bin.000001 # Query # # BEGIN
1217 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1218-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1219+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1220 master-bin.000001 # Xid # # COMMIT /* XID */
1221 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1222
1223@@ -341,8 +341,8 @@
1224 master-bin.000001 # Query # # COMMIT
1225 master-bin.000001 # Query # # BEGIN
1226 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1227-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1228-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1229+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1230+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1231 master-bin.000001 # Xid # # COMMIT /* XID */
1232 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1233
1234@@ -396,7 +396,7 @@
1235 include/show_binlog_events.inc
1236 Log_name Pos Event_type Server_id End_log_pos Info
1237 master-bin.000001 # Query # # BEGIN
1238-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1239+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1240 master-bin.000001 # Query # # COMMIT
1241 master-bin.000001 # Query # # BEGIN
1242 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1243@@ -416,13 +416,13 @@
1244 include/show_binlog_events.inc
1245 Log_name Pos Event_type Server_id End_log_pos Info
1246 master-bin.000001 # Query # # BEGIN
1247-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1248+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1249 master-bin.000001 # Query # # COMMIT
1250 master-bin.000001 # Query # # BEGIN
1251 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1252 master-bin.000001 # Query # # COMMIT
1253 master-bin.000001 # Query # # BEGIN
1254-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /* generated by server */
1255+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /* generated by server */
1256 master-bin.000001 # Query # # COMMIT
1257 master-bin.000001 # Query # # BEGIN
1258 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1259@@ -484,11 +484,11 @@
1260 include/show_binlog_events.inc
1261 Log_name Pos Event_type Server_id End_log_pos Info
1262 master-bin.000001 # Query # # BEGIN
1263-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1264+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1265 master-bin.000001 # Query # # COMMIT
1266 master-bin.000001 # Query # # BEGIN
1267 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1268-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1269+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1270 master-bin.000001 # Xid # # COMMIT /* XID */
1271 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1272
1273@@ -503,18 +503,18 @@
1274 include/show_binlog_events.inc
1275 Log_name Pos Event_type Server_id End_log_pos Info
1276 master-bin.000001 # Query # # BEGIN
1277-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1278+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1279 master-bin.000001 # Query # # COMMIT
1280 master-bin.000001 # Query # # BEGIN
1281 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1282 master-bin.000001 # Query # # COMMIT
1283 master-bin.000001 # Query # # BEGIN
1284-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /* generated by server */
1285+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /* generated by server */
1286 master-bin.000001 # Query # # COMMIT
1287 master-bin.000001 # Query # # BEGIN
1288 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1289-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1290-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1291+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1292+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1293 master-bin.000001 # Xid # # COMMIT /* XID */
1294 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1295
1296@@ -528,7 +528,7 @@
1297 Log_name Pos Event_type Server_id End_log_pos Info
1298 master-bin.000001 # Query # # BEGIN
1299 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1300-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1`,`tt_tmp_2` /* generated by server */
1301+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1`,`test`.`tt_tmp_2` /* generated by server */
1302 master-bin.000001 # Xid # # COMMIT /* XID */
1303 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1304
1305@@ -546,7 +546,7 @@
1306 master-bin.000001 # Query # # COMMIT
1307 master-bin.000001 # Query # # BEGIN
1308 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1309-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1`,`tt_tmp_2` /* generated by server */
1310+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1`,`test`.`tt_tmp_2` /* generated by server */
1311 master-bin.000001 # Xid # # COMMIT /* XID */
1312 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1313
1314@@ -559,7 +559,7 @@
1315 include/show_binlog_events.inc
1316 Log_name Pos Event_type Server_id End_log_pos Info
1317 master-bin.000001 # Query # # BEGIN
1318-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1319+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1320 master-bin.000001 # Query # # COMMIT
1321 master-bin.000001 # Query # # BEGIN
1322 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1323@@ -576,7 +576,7 @@
1324 include/show_binlog_events.inc
1325 Log_name Pos Event_type Server_id End_log_pos Info
1326 master-bin.000001 # Query # # BEGIN
1327-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1328+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1329 master-bin.000001 # Query # # COMMIT
1330 master-bin.000001 # Query # # BEGIN
1331 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1332@@ -598,7 +598,7 @@
1333 include/show_binlog_events.inc
1334 Log_name Pos Event_type Server_id End_log_pos Info
1335 master-bin.000001 # Query # # BEGIN
1336-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1337+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1338 master-bin.000001 # Query # # COMMIT
1339 master-bin.000001 # Query # # BEGIN
1340 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1341@@ -623,7 +623,7 @@
1342 include/show_binlog_events.inc
1343 Log_name Pos Event_type Server_id End_log_pos Info
1344 master-bin.000001 # Query # # BEGIN
1345-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1346+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1347 master-bin.000001 # Query # # COMMIT
1348 master-bin.000001 # Query # # BEGIN
1349 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1350@@ -645,7 +645,7 @@
1351 include/show_binlog_events.inc
1352 Log_name Pos Event_type Server_id End_log_pos Info
1353 master-bin.000001 # Query # # BEGIN
1354-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1355+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1356 master-bin.000001 # Query # # COMMIT
1357 master-bin.000001 # Query # # BEGIN
1358 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1359@@ -674,7 +674,7 @@
1360 Log_name Pos Event_type Server_id End_log_pos Info
1361 master-bin.000001 # Query # # BEGIN
1362 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1363-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1364+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1365 master-bin.000001 # Query # # ROLLBACK
1366 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1367
1368@@ -696,8 +696,8 @@
1369 master-bin.000001 # Query # # COMMIT
1370 master-bin.000001 # Query # # BEGIN
1371 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1372-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1373-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1374+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1375+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1376 master-bin.000001 # Query # # ROLLBACK
1377 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-T-Temp N Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1378
1379@@ -712,7 +712,7 @@
1380 include/show_binlog_events.inc
1381 Log_name Pos Event_type Server_id End_log_pos Info
1382 master-bin.000001 # Query # # BEGIN
1383-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1384+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1385 master-bin.000001 # Query # # COMMIT
1386 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1387
1388@@ -730,13 +730,13 @@
1389 include/show_binlog_events.inc
1390 Log_name Pos Event_type Server_id End_log_pos Info
1391 master-bin.000001 # Query # # BEGIN
1392-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1393+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1394 master-bin.000001 # Query # # COMMIT
1395 master-bin.000001 # Query # # BEGIN
1396 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1397 master-bin.000001 # Query # # COMMIT
1398 master-bin.000001 # Query # # BEGIN
1399-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /* generated by server */
1400+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /* generated by server */
1401 master-bin.000001 # Query # # COMMIT
1402 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp N Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1403
1404@@ -827,7 +827,7 @@
1405 Log_name Pos Event_type Server_id End_log_pos Info
1406 master-bin.000001 # Query # # BEGIN
1407 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1408-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1409+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1410 master-bin.000001 # Query # # ROLLBACK
1411 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1412
1413@@ -851,8 +851,8 @@
1414 master-bin.000001 # Query # # COMMIT
1415 master-bin.000001 # Query # # BEGIN
1416 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1417-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1418-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1419+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1420+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1421 master-bin.000001 # Query # # ROLLBACK
1422 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1423
1424@@ -913,7 +913,7 @@
1425 include/show_binlog_events.inc
1426 Log_name Pos Event_type Server_id End_log_pos Info
1427 master-bin.000001 # Query # # BEGIN
1428-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1429+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1430 master-bin.000001 # Query # # COMMIT
1431 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1432
1433@@ -933,13 +933,13 @@
1434 include/show_binlog_events.inc
1435 Log_name Pos Event_type Server_id End_log_pos Info
1436 master-bin.000001 # Query # # BEGIN
1437-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1438+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1439 master-bin.000001 # Query # # COMMIT
1440 master-bin.000001 # Query # # BEGIN
1441 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1442 master-bin.000001 # Query # # COMMIT
1443 master-bin.000001 # Query # # BEGIN
1444-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /* generated by server */
1445+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /* generated by server */
1446 master-bin.000001 # Query # # COMMIT
1447 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1448
1449@@ -999,11 +999,11 @@
1450 include/show_binlog_events.inc
1451 Log_name Pos Event_type Server_id End_log_pos Info
1452 master-bin.000001 # Query # # BEGIN
1453-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1454+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1455 master-bin.000001 # Query # # COMMIT
1456 master-bin.000001 # Query # # BEGIN
1457 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1458-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1459+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1460 master-bin.000001 # Query # # ROLLBACK
1461 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1462
1463@@ -1021,18 +1021,18 @@
1464 include/show_binlog_events.inc
1465 Log_name Pos Event_type Server_id End_log_pos Info
1466 master-bin.000001 # Query # # BEGIN
1467-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1468+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1469 master-bin.000001 # Query # # COMMIT
1470 master-bin.000001 # Query # # BEGIN
1471 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1472 master-bin.000001 # Query # # COMMIT
1473 master-bin.000001 # Query # # BEGIN
1474-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /* generated by server */
1475+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /* generated by server */
1476 master-bin.000001 # Query # # COMMIT
1477 master-bin.000001 # Query # # BEGIN
1478 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1479-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1480-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1481+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1482+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1483 master-bin.000001 # Query # # ROLLBACK
1484 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp N Drop-Temp-TN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1485
1486@@ -1048,7 +1048,7 @@
1487 Log_name Pos Event_type Server_id End_log_pos Info
1488 master-bin.000001 # Query # # BEGIN
1489 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1490-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1`,`tt_tmp_2` /* generated by server */
1491+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1`,`test`.`tt_tmp_2` /* generated by server */
1492 master-bin.000001 # Query # # ROLLBACK
1493 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1494
1495@@ -1069,7 +1069,7 @@
1496 master-bin.000001 # Query # # COMMIT
1497 master-bin.000001 # Query # # BEGIN
1498 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1499-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1`,`tt_tmp_2` /* generated by server */
1500+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1`,`test`.`tt_tmp_2` /* generated by server */
1501 master-bin.000001 # Query # # ROLLBACK
1502 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp N Drop-Temp-TT-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1503
1504@@ -1084,7 +1084,7 @@
1505 include/show_binlog_events.inc
1506 Log_name Pos Event_type Server_id End_log_pos Info
1507 master-bin.000001 # Query # # BEGIN
1508-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1509+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1510 master-bin.000001 # Query # # COMMIT
1511 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1512
1513@@ -1101,7 +1101,7 @@
1514 include/show_binlog_events.inc
1515 Log_name Pos Event_type Server_id End_log_pos Info
1516 master-bin.000001 # Query # # BEGIN
1517-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1518+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1519 master-bin.000001 # Query # # COMMIT
1520 master-bin.000001 # Query # # BEGIN
1521 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1522@@ -1123,7 +1123,7 @@
1523 include/show_binlog_events.inc
1524 Log_name Pos Event_type Server_id End_log_pos Info
1525 master-bin.000001 # Query # # BEGIN
1526-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1527+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1528 master-bin.000001 # Query # # COMMIT
1529 master-bin.000001 # Query # # BEGIN
1530 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1531@@ -1148,7 +1148,7 @@
1532 include/show_binlog_events.inc
1533 Log_name Pos Event_type Server_id End_log_pos Info
1534 master-bin.000001 # Query # # BEGIN
1535-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1536+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1537 master-bin.000001 # Query # # COMMIT
1538 master-bin.000001 # Query # # BEGIN
1539 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1540@@ -1170,7 +1170,7 @@
1541 include/show_binlog_events.inc
1542 Log_name Pos Event_type Server_id End_log_pos Info
1543 master-bin.000001 # Query # # BEGIN
1544-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1`,`nt_tmp_2` /* generated by server */
1545+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1`,`test`.`nt_tmp_2` /* generated by server */
1546 master-bin.000001 # Query # # COMMIT
1547 master-bin.000001 # Query # # BEGIN
1548 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1549@@ -1287,8 +1287,8 @@
1550 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-N-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1551 include/show_binlog_events.inc
1552 Log_name Pos Event_type Server_id End_log_pos Info
1553-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1554-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1555+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1556+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1557 master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2` /* generated by server */
1558 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-N-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1559
1560@@ -1297,8 +1297,8 @@
1561 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-TN-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1562 include/show_binlog_events.inc
1563 Log_name Pos Event_type Server_id End_log_pos Info
1564-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1565-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1566+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1567+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1568 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1569
1570
1571@@ -1466,8 +1466,8 @@
1572 master-bin.000001 # Query # # BEGIN
1573 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1574 master-bin.000001 # Xid # # COMMIT /* XID */
1575-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1576-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1577+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1578+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1579 master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2` /* generated by server */
1580 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-N-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1581
1582@@ -1481,8 +1481,8 @@
1583 master-bin.000001 # Query # # BEGIN
1584 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1585 master-bin.000001 # Xid # # COMMIT /* XID */
1586-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1587-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1588+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1589+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1590 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-TN-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1591
1592 #########################################################################
1593@@ -1500,10 +1500,9 @@
1594 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1595 include/show_binlog_events.inc
1596 Log_name Pos Event_type Server_id End_log_pos Info
1597-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1598-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam
1599-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /* generated by server */
1600-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1601+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1602+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /* generated by server */
1603+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1604 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1605
1606 SET @commands= 'Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp';
1607@@ -1514,10 +1513,9 @@
1608 -b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp << -b-b-b-b-b-b-b-b-b-b-b-
1609 include/show_binlog_events.inc
1610 Log_name Pos Event_type Server_id End_log_pos Info
1611-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1612-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
1613-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1614-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1615+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1616+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1617+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1618 -e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp << -e-e-e-e-e-e-e-e-e-e-e-
1619
1620
1621@@ -1536,16 +1534,13 @@
1622 include/show_binlog_events.inc
1623 Log_name Pos Event_type Server_id End_log_pos Info
1624 master-bin.000001 # Query # # BEGIN
1625-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1626-master-bin.000001 # Query # # COMMIT
1627-master-bin.000001 # Query # # BEGIN
1628-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam
1629-master-bin.000001 # Query # # COMMIT
1630-master-bin.000001 # Query # # BEGIN
1631-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /* generated by server */
1632-master-bin.000001 # Query # # COMMIT
1633-master-bin.000001 # Query # # BEGIN
1634-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1635+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1636+master-bin.000001 # Query # # COMMIT
1637+master-bin.000001 # Query # # BEGIN
1638+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /* generated by server */
1639+master-bin.000001 # Query # # COMMIT
1640+master-bin.000001 # Query # # BEGIN
1641+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1642 master-bin.000001 # Query # # COMMIT
1643 master-bin.000001 # Query # # BEGIN
1644 master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
1645@@ -1563,10 +1558,9 @@
1646 include/show_binlog_events.inc
1647 Log_name Pos Event_type Server_id End_log_pos Info
1648 master-bin.000001 # Query # # BEGIN
1649-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1650-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
1651-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1652-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1653+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1654+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1655+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1656 master-bin.000001 # Query # # COMMIT
1657 -e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1658
1659@@ -1586,10 +1580,9 @@
1660 master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (5), (5)
1661 master-bin.000001 # Query # # COMMIT
1662 master-bin.000001 # Query # # BEGIN
1663-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1664-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
1665-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1666-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1667+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1668+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1669+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1670 master-bin.000001 # Query # # COMMIT
1671 -e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Ne C << -e-e-e-e-e-e-e-e-e-e-e-
1672
1673@@ -1606,10 +1599,9 @@
1674 include/show_binlog_events.inc
1675 Log_name Pos Event_type Server_id End_log_pos Info
1676 master-bin.000001 # Query # # BEGIN
1677-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1678-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
1679-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1680-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1681+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1682+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1683+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1684 master-bin.000001 # Query # # COMMIT
1685 -e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
1686
1687@@ -1629,10 +1621,9 @@
1688 master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (6), (6)
1689 master-bin.000001 # Query # # COMMIT
1690 master-bin.000001 # Query # # BEGIN
1691-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1692-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
1693-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1694-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1695+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1696+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1697+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1698 master-bin.000001 # Query # # COMMIT
1699 -e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig C << -e-e-e-e-e-e-e-e-e-e-e-
1700
1701@@ -1655,16 +1646,13 @@
1702 include/show_binlog_events.inc
1703 Log_name Pos Event_type Server_id End_log_pos Info
1704 master-bin.000001 # Query # # BEGIN
1705-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1706-master-bin.000001 # Query # # COMMIT
1707-master-bin.000001 # Query # # BEGIN
1708-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) engine= MyIsam
1709-master-bin.000001 # Query # # COMMIT
1710-master-bin.000001 # Query # # BEGIN
1711-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_1` /* generated by server */
1712-master-bin.000001 # Query # # COMMIT
1713-master-bin.000001 # Query # # BEGIN
1714-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
1715+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1716+master-bin.000001 # Query # # COMMIT
1717+master-bin.000001 # Query # # BEGIN
1718+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /* generated by server */
1719+master-bin.000001 # Query # # COMMIT
1720+master-bin.000001 # Query # # BEGIN
1721+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
1722 master-bin.000001 # Query # # COMMIT
1723 -e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-N-Temp Create-N-Temp Drop-Temp-N-Temp Drop-Temp-N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1724
1725@@ -1682,10 +1670,9 @@
1726 include/show_binlog_events.inc
1727 Log_name Pos Event_type Server_id End_log_pos Info
1728 master-bin.000001 # Query # # BEGIN
1729-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1730-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
1731-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1732-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1733+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1734+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1735+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1736 master-bin.000001 # Query # # ROLLBACK
1737 -e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1738
1739@@ -1709,10 +1696,9 @@
1740 master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (7), (7)
1741 master-bin.000001 # Query # # COMMIT
1742 master-bin.000001 # Query # # BEGIN
1743-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1744-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
1745-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1746-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1747+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1748+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1749+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1750 master-bin.000001 # Query # # ROLLBACK
1751 -e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Ne R << -e-e-e-e-e-e-e-e-e-e-e-
1752
1753@@ -1732,10 +1718,9 @@
1754 include/show_binlog_events.inc
1755 Log_name Pos Event_type Server_id End_log_pos Info
1756 master-bin.000001 # Query # # BEGIN
1757-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1758-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
1759-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1760-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1761+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1762+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1763+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1764 master-bin.000001 # Query # # ROLLBACK
1765 -e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
1766
1767@@ -1759,10 +1744,9 @@
1768 master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (8), (8)
1769 master-bin.000001 # Query # # COMMIT
1770 master-bin.000001 # Query # # BEGIN
1771-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1772-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
1773-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1` /* generated by server */
1774-master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
1775+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1776+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
1777+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
1778 master-bin.000001 # Query # # ROLLBACK
1779 -e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig R << -e-e-e-e-e-e-e-e-e-e-e-
1780
1781@@ -1787,13 +1771,8 @@
1782 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1783 master-bin.000001 # Query # # COMMIT
1784 master-bin.000001 # Query # # BEGIN
1785-master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
1786-master-bin.000001 # Query # # COMMIT
1787-master-bin.000001 # Query # # BEGIN
1788-master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1 SELECT * FROM nt_tmp_xx_1
1789-master-bin.000001 # Query # # COMMIT
1790-master-bin.000001 # Query # # BEGIN
1791-master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
1792+master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1793+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1794 master-bin.000001 # Query # # COMMIT
1795 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-N-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1796
1797@@ -1811,9 +1790,6 @@
1798 master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1799 master-bin.000001 # Query # # COMMIT
1800 master-bin.000001 # Query # # BEGIN
1801-master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
1802-master-bin.000001 # Query # # COMMIT
1803-master-bin.000001 # Query # # BEGIN
1804 master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
1805 master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1806 master-bin.000001 # Xid # # COMMIT /* XID */
1807@@ -1830,8 +1806,7 @@
1808 include/show_binlog_events.inc
1809 Log_name Pos Event_type Server_id End_log_pos Info
1810 master-bin.000001 # Query # # BEGIN
1811-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1812-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1813+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1814 master-bin.000001 # Query # # COMMIT
1815 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-T-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1816
1817@@ -1846,8 +1821,7 @@
1818 include/show_binlog_events.inc
1819 Log_name Pos Event_type Server_id End_log_pos Info
1820 master-bin.000001 # Query # # BEGIN
1821-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1822-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1823+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1824 master-bin.000001 # Query # # COMMIT
1825 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
1826
1827@@ -1864,12 +1838,10 @@
1828 include/show_binlog_events.inc
1829 Log_name Pos Event_type Server_id End_log_pos Info
1830 master-bin.000001 # Query # # BEGIN
1831-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1832-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1833+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1834 master-bin.000001 # Query # # COMMIT
1835 master-bin.000001 # Query # # BEGIN
1836-master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
1837-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1838+master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (9), (9)
1839 master-bin.000001 # Query # # COMMIT
1840 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp Ne C << -e-e-e-e-e-e-e-e-e-e-e-
1841
1842@@ -1886,8 +1858,7 @@
1843 include/show_binlog_events.inc
1844 Log_name Pos Event_type Server_id End_log_pos Info
1845 master-bin.000001 # Query # # BEGIN
1846-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1847-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1848+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1849 master-bin.000001 # Query # # COMMIT
1850 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
1851
1852@@ -1904,12 +1875,10 @@
1853 include/show_binlog_events.inc
1854 Log_name Pos Event_type Server_id End_log_pos Info
1855 master-bin.000001 # Query # # BEGIN
1856-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1857-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1858+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1859 master-bin.000001 # Query # # COMMIT
1860 master-bin.000001 # Query # # BEGIN
1861-master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
1862-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1863+master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (10), (10)
1864 master-bin.000001 # Query # # COMMIT
1865 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig C << -e-e-e-e-e-e-e-e-e-e-e-
1866
1867@@ -1931,8 +1900,7 @@
1868 include/show_binlog_events.inc
1869 Log_name Pos Event_type Server_id End_log_pos Info
1870 master-bin.000001 # Query # # BEGIN
1871-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1872-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1873+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1874 master-bin.000001 # Query # # COMMIT
1875 master-bin.000001 # Query # # BEGIN
1876 master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1877@@ -1953,8 +1921,7 @@
1878 include/show_binlog_events.inc
1879 Log_name Pos Event_type Server_id End_log_pos Info
1880 master-bin.000001 # Query # # BEGIN
1881-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1882-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1883+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1884 master-bin.000001 # Query # # COMMIT
1885 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-N-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1886
1887@@ -1971,8 +1938,7 @@
1888 include/show_binlog_events.inc
1889 Log_name Pos Event_type Server_id End_log_pos Info
1890 master-bin.000001 # Query # # BEGIN
1891-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1892-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1893+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1894 master-bin.000001 # Query # # COMMIT
1895 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp N-SELECT-T-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1896
1897@@ -1989,8 +1955,7 @@
1898 include/show_binlog_events.inc
1899 Log_name Pos Event_type Server_id End_log_pos Info
1900 master-bin.000001 # Query # # BEGIN
1901-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1902-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1903+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1904 master-bin.000001 # Query # # COMMIT
1905 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
1906
1907@@ -2009,12 +1974,10 @@
1908 include/show_binlog_events.inc
1909 Log_name Pos Event_type Server_id End_log_pos Info
1910 master-bin.000001 # Query # # BEGIN
1911-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1912-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1913+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1914 master-bin.000001 # Query # # COMMIT
1915 master-bin.000001 # Query # # BEGIN
1916-master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
1917-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1918+master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (11), (11)
1919 master-bin.000001 # Query # # COMMIT
1920 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp Ne R << -e-e-e-e-e-e-e-e-e-e-e-
1921
1922@@ -2033,8 +1996,7 @@
1923 include/show_binlog_events.inc
1924 Log_name Pos Event_type Server_id End_log_pos Info
1925 master-bin.000001 # Query # # BEGIN
1926-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1927-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1928+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1929 master-bin.000001 # Query # # COMMIT
1930 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
1931
1932@@ -2053,12 +2015,10 @@
1933 include/show_binlog_events.inc
1934 Log_name Pos Event_type Server_id End_log_pos Info
1935 master-bin.000001 # Query # # BEGIN
1936-master-bin.000001 # Table_map # # table_id: # (test.nt_xx_1)
1937-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1938+master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
1939 master-bin.000001 # Query # # COMMIT
1940 master-bin.000001 # Query # # BEGIN
1941-master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
1942-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1943+master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (12), (12)
1944 master-bin.000001 # Query # # COMMIT
1945 -e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R << -e-e-e-e-e-e-e-e-e-e-e-
1946
1947
1948=== modified file 'mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result'
1949--- mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result 2014-06-04 14:48:06 +0000
1950+++ mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result 2014-10-25 19:41:47 +0000
1951@@ -450,7 +450,6 @@
1952 Log_name Pos Event_type Server_id End_log_pos Info
1953 master-bin.000001 # Query # # BEGIN
1954 master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (11)
1955-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx (a int)
1956 master-bin.000001 # Xid # # COMMIT /* XID */
1957 -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
1958
1959@@ -462,8 +461,7 @@
1960 include/show_binlog_events.inc
1961 Log_name Pos Event_type Server_id End_log_pos Info
1962 master-bin.000001 # Query # # BEGIN
1963-master-bin.000001 # Table_map # # table_id: # (test.tt_1)
1964-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1965+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (10)
1966 master-bin.000001 # Xid # # COMMIT /* XID */
1967 -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
1968
1969@@ -475,8 +473,7 @@
1970 include/show_binlog_events.inc
1971 Log_name Pos Event_type Server_id End_log_pos Info
1972 master-bin.000001 # Query # # BEGIN
1973-master-bin.000001 # Table_map # # table_id: # (test.tt_1)
1974-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1975+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (9)
1976 master-bin.000001 # Xid # # COMMIT /* XID */
1977 -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
1978
1979@@ -488,8 +485,7 @@
1980 include/show_binlog_events.inc
1981 Log_name Pos Event_type Server_id End_log_pos Info
1982 master-bin.000001 # Query # # BEGIN
1983-master-bin.000001 # Table_map # # table_id: # (test.tt_1)
1984-master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
1985+master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(ddl_case) VALUES (8)
1986 master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`new_tt_xx` /* generated by server */
1987 master-bin.000001 # Xid # # COMMIT /* XID */
1988 -e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
1989
1990=== modified file 'mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result'
1991--- mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result 2013-10-15 11:37:57 +0000
1992+++ mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result 2014-10-25 19:41:47 +0000
1993@@ -12403,19 +12403,9 @@
1994 Warnings:
1995 Warning # The creation of some temporary tables could not be rolled back.
1996 include/show_binlog_events.inc
1997-Log_name Pos Event_type Server_id End_log_pos Info
1998-master-bin.000001 # Query # # BEGIN
1999-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2)
2000-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb
2001-master-bin.000001 # Query # # ROLLBACK
2002 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2003 -b-b-b-b-b-b-b-b-b-b-b- >> B T CT R << -b-b-b-b-b-b-b-b-b-b-b-
2004 include/show_binlog_events.inc
2005-Log_name Pos Event_type Server_id End_log_pos Info
2006-master-bin.000001 # Query # # BEGIN
2007-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2)
2008-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb
2009-master-bin.000001 # Query # # ROLLBACK
2010 -e-e-e-e-e-e-e-e-e-e-e- >> B T CT R << -e-e-e-e-e-e-e-e-e-e-e-
2011
2012 rpl_mixing_engines.inc [commands=drop-CT]
2013@@ -12463,25 +12453,9 @@
2014 Warnings:
2015 Warning # The creation of some temporary tables could not be rolled back.
2016 include/show_binlog_events.inc
2017-Log_name Pos Event_type Server_id End_log_pos Info
2018-master-bin.000001 # Query # # BEGIN
2019-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
2020-master-bin.000001 # Query # # SAVEPOINT `S_0`
2021-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
2022-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
2023-master-bin.000001 # Query # # ROLLBACK TO `S_0`
2024-master-bin.000001 # Query # # ROLLBACK
2025 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2026 -b-b-b-b-b-b-b-b-b-b-b- >> B T Sn T CT Rn R << -b-b-b-b-b-b-b-b-b-b-b-
2027 include/show_binlog_events.inc
2028-Log_name Pos Event_type Server_id End_log_pos Info
2029-master-bin.000001 # Query # # BEGIN
2030-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
2031-master-bin.000001 # Query # # SAVEPOINT `S_0`
2032-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
2033-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
2034-master-bin.000001 # Query # # ROLLBACK TO `S_0`
2035-master-bin.000001 # Query # # ROLLBACK
2036 -e-e-e-e-e-e-e-e-e-e-e- >> B T Sn T CT Rn R << -e-e-e-e-e-e-e-e-e-e-e-
2037
2038 rpl_mixing_engines.inc [commands=drop-CT]
2039@@ -12519,21 +12493,9 @@
2040 Warnings:
2041 Warning # The creation of some temporary tables could not be rolled back.
2042 include/show_binlog_events.inc
2043-Log_name Pos Event_type Server_id End_log_pos Info
2044-master-bin.000001 # Query # # BEGIN
2045-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2)
2046-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb
2047-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5)
2048-master-bin.000001 # Query # # ROLLBACK
2049 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2050 -b-b-b-b-b-b-b-b-b-b-b- >> B T CT T R << -b-b-b-b-b-b-b-b-b-b-b-
2051 include/show_binlog_events.inc
2052-Log_name Pos Event_type Server_id End_log_pos Info
2053-master-bin.000001 # Query # # BEGIN
2054-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2)
2055-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb
2056-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5)
2057-master-bin.000001 # Query # # ROLLBACK
2058 -e-e-e-e-e-e-e-e-e-e-e- >> B T CT T R << -e-e-e-e-e-e-e-e-e-e-e-
2059
2060 rpl_mixing_engines.inc [commands=drop-CT]
2061@@ -12576,11 +12538,6 @@
2062 Warning # Some non-transactional changed tables couldn't be rolled back
2063 Warning # The creation of some temporary tables could not be rolled back.
2064 include/show_binlog_events.inc
2065-Log_name Pos Event_type Server_id End_log_pos Info
2066-master-bin.000001 # Query # # BEGIN
2067-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_14 (a int) engine=Innodb
2068-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (357, 5)
2069-master-bin.000001 # Query # # ROLLBACK
2070 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2071 -b-b-b-b-b-b-b-b-b-b-b- >> B tN CT T R << -b-b-b-b-b-b-b-b-b-b-b-
2072 include/show_binlog_events.inc
2073@@ -12588,10 +12545,6 @@
2074 master-bin.000001 # Query # # BEGIN
2075 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1
2076 master-bin.000001 # Query # # COMMIT
2077-master-bin.000001 # Query # # BEGIN
2078-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_14 (a int) engine=Innodb
2079-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (357, 5)
2080-master-bin.000001 # Query # # ROLLBACK
2081 -e-e-e-e-e-e-e-e-e-e-e- >> B tN CT T R << -e-e-e-e-e-e-e-e-e-e-e-
2082
2083 rpl_mixing_engines.inc [commands=drop-CT]
2084@@ -12625,19 +12578,9 @@
2085 Warnings:
2086 Warning # The creation of some temporary tables could not be rolled back.
2087 include/show_binlog_events.inc
2088-Log_name Pos Event_type Server_id End_log_pos Info
2089-master-bin.000001 # Query # # BEGIN
2090-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_15 (a int) engine=Innodb
2091-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (359, 3)
2092-master-bin.000001 # Query # # ROLLBACK
2093 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2094 -b-b-b-b-b-b-b-b-b-b-b- >> B CT T R << -b-b-b-b-b-b-b-b-b-b-b-
2095 include/show_binlog_events.inc
2096-Log_name Pos Event_type Server_id End_log_pos Info
2097-master-bin.000001 # Query # # BEGIN
2098-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_15 (a int) engine=Innodb
2099-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (359, 3)
2100-master-bin.000001 # Query # # ROLLBACK
2101 -e-e-e-e-e-e-e-e-e-e-e- >> B CT T R << -e-e-e-e-e-e-e-e-e-e-e-
2102
2103 rpl_mixing_engines.inc [commands=drop-CT]
2104@@ -12680,11 +12623,6 @@
2105 Warning # Some non-transactional changed tables couldn't be rolled back
2106 Warning # The creation of some temporary tables could not be rolled back.
2107 include/show_binlog_events.inc
2108-Log_name Pos Event_type Server_id End_log_pos Info
2109-master-bin.000001 # Query # # BEGIN
2110-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_16 (a int) engine=Innodb
2111-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (361, 5)
2112-master-bin.000001 # Query # # ROLLBACK
2113 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2114 -b-b-b-b-b-b-b-b-b-b-b- >> B N CT T R << -b-b-b-b-b-b-b-b-b-b-b-
2115 include/show_binlog_events.inc
2116@@ -12692,10 +12630,6 @@
2117 master-bin.000001 # Query # # BEGIN
2118 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (361, 2)
2119 master-bin.000001 # Query # # COMMIT
2120-master-bin.000001 # Query # # BEGIN
2121-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_16 (a int) engine=Innodb
2122-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (361, 5)
2123-master-bin.000001 # Query # # ROLLBACK
2124 -e-e-e-e-e-e-e-e-e-e-e- >> B N CT T R << -e-e-e-e-e-e-e-e-e-e-e-
2125
2126 rpl_mixing_engines.inc [commands=drop-CT]
2127
2128=== modified file 'mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result'
2129--- mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result 2013-10-15 11:37:57 +0000
2130+++ mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result 2014-10-25 19:41:47 +0000
2131@@ -12775,19 +12775,9 @@
2132 Warnings:
2133 Warning # The creation of some temporary tables could not be rolled back.
2134 include/show_binlog_events.inc
2135-Log_name Pos Event_type Server_id End_log_pos Info
2136-master-bin.000001 # Query # # BEGIN
2137-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2)
2138-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb
2139-master-bin.000001 # Query # # ROLLBACK
2140 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2141 -b-b-b-b-b-b-b-b-b-b-b- >> B T CT R << -b-b-b-b-b-b-b-b-b-b-b-
2142 include/show_binlog_events.inc
2143-Log_name Pos Event_type Server_id End_log_pos Info
2144-master-bin.000001 # Query # # BEGIN
2145-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (351, 2)
2146-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_11 (a int) engine=Innodb
2147-master-bin.000001 # Query # # ROLLBACK
2148 -e-e-e-e-e-e-e-e-e-e-e- >> B T CT R << -e-e-e-e-e-e-e-e-e-e-e-
2149
2150 rpl_mixing_engines.inc [commands=drop-CT]
2151@@ -12835,25 +12825,9 @@
2152 Warnings:
2153 Warning # The creation of some temporary tables could not be rolled back.
2154 include/show_binlog_events.inc
2155-Log_name Pos Event_type Server_id End_log_pos Info
2156-master-bin.000001 # Query # # BEGIN
2157-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
2158-master-bin.000001 # Query # # SAVEPOINT `S_0`
2159-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
2160-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
2161-master-bin.000001 # Query # # ROLLBACK TO `S_0`
2162-master-bin.000001 # Query # # ROLLBACK
2163 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2164 -b-b-b-b-b-b-b-b-b-b-b- >> B T Sn T CT Rn R << -b-b-b-b-b-b-b-b-b-b-b-
2165 include/show_binlog_events.inc
2166-Log_name Pos Event_type Server_id End_log_pos Info
2167-master-bin.000001 # Query # # BEGIN
2168-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 2)
2169-master-bin.000001 # Query # # SAVEPOINT `S_0`
2170-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (353, 5)
2171-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_12 (a int) engine=Innodb
2172-master-bin.000001 # Query # # ROLLBACK TO `S_0`
2173-master-bin.000001 # Query # # ROLLBACK
2174 -e-e-e-e-e-e-e-e-e-e-e- >> B T Sn T CT Rn R << -e-e-e-e-e-e-e-e-e-e-e-
2175
2176 rpl_mixing_engines.inc [commands=drop-CT]
2177@@ -12891,21 +12865,9 @@
2178 Warnings:
2179 Warning # The creation of some temporary tables could not be rolled back.
2180 include/show_binlog_events.inc
2181-Log_name Pos Event_type Server_id End_log_pos Info
2182-master-bin.000001 # Query # # BEGIN
2183-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2)
2184-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb
2185-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5)
2186-master-bin.000001 # Query # # ROLLBACK
2187 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2188 -b-b-b-b-b-b-b-b-b-b-b- >> B T CT T R << -b-b-b-b-b-b-b-b-b-b-b-
2189 include/show_binlog_events.inc
2190-Log_name Pos Event_type Server_id End_log_pos Info
2191-master-bin.000001 # Query # # BEGIN
2192-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 2)
2193-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_13 (a int) engine=Innodb
2194-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (355, 5)
2195-master-bin.000001 # Query # # ROLLBACK
2196 -e-e-e-e-e-e-e-e-e-e-e- >> B T CT T R << -e-e-e-e-e-e-e-e-e-e-e-
2197
2198 rpl_mixing_engines.inc [commands=drop-CT]
2199@@ -12948,11 +12910,6 @@
2200 Warning # Some non-transactional changed tables couldn't be rolled back
2201 Warning # The creation of some temporary tables could not be rolled back.
2202 include/show_binlog_events.inc
2203-Log_name Pos Event_type Server_id End_log_pos Info
2204-master-bin.000001 # Query # # BEGIN
2205-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_14 (a int) engine=Innodb
2206-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (357, 5)
2207-master-bin.000001 # Query # # ROLLBACK
2208 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2209 -b-b-b-b-b-b-b-b-b-b-b- >> B tN CT T R << -b-b-b-b-b-b-b-b-b-b-b-
2210 include/show_binlog_events.inc
2211@@ -12960,10 +12917,6 @@
2212 master-bin.000001 # Query # # BEGIN
2213 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id, info) SELECT 357, 2, COUNT(*) FROM tt_1
2214 master-bin.000001 # Query # # COMMIT
2215-master-bin.000001 # Query # # BEGIN
2216-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_14 (a int) engine=Innodb
2217-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (357, 5)
2218-master-bin.000001 # Query # # ROLLBACK
2219 -e-e-e-e-e-e-e-e-e-e-e- >> B tN CT T R << -e-e-e-e-e-e-e-e-e-e-e-
2220
2221 rpl_mixing_engines.inc [commands=drop-CT]
2222@@ -12997,19 +12950,9 @@
2223 Warnings:
2224 Warning # The creation of some temporary tables could not be rolled back.
2225 include/show_binlog_events.inc
2226-Log_name Pos Event_type Server_id End_log_pos Info
2227-master-bin.000001 # Query # # BEGIN
2228-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_15 (a int) engine=Innodb
2229-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (359, 3)
2230-master-bin.000001 # Query # # ROLLBACK
2231 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2232 -b-b-b-b-b-b-b-b-b-b-b- >> B CT T R << -b-b-b-b-b-b-b-b-b-b-b-
2233 include/show_binlog_events.inc
2234-Log_name Pos Event_type Server_id End_log_pos Info
2235-master-bin.000001 # Query # # BEGIN
2236-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_15 (a int) engine=Innodb
2237-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (359, 3)
2238-master-bin.000001 # Query # # ROLLBACK
2239 -e-e-e-e-e-e-e-e-e-e-e- >> B CT T R << -e-e-e-e-e-e-e-e-e-e-e-
2240
2241 rpl_mixing_engines.inc [commands=drop-CT]
2242@@ -13052,11 +12995,6 @@
2243 Warning # Some non-transactional changed tables couldn't be rolled back
2244 Warning # The creation of some temporary tables could not be rolled back.
2245 include/show_binlog_events.inc
2246-Log_name Pos Event_type Server_id End_log_pos Info
2247-master-bin.000001 # Query # # BEGIN
2248-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_16 (a int) engine=Innodb
2249-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (361, 5)
2250-master-bin.000001 # Query # # ROLLBACK
2251 -e-e-e-e-e-e-e-e-e-e-e- >> R << -e-e-e-e-e-e-e-e-e-e-e-
2252 -b-b-b-b-b-b-b-b-b-b-b- >> B N CT T R << -b-b-b-b-b-b-b-b-b-b-b-
2253 include/show_binlog_events.inc
2254@@ -13064,10 +13002,6 @@
2255 master-bin.000001 # Query # # BEGIN
2256 master-bin.000001 # Query # # use `test`; INSERT INTO nt_1(trans_id, stmt_id) VALUES (361, 2)
2257 master-bin.000001 # Query # # COMMIT
2258-master-bin.000001 # Query # # BEGIN
2259-master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_xx_16 (a int) engine=Innodb
2260-master-bin.000001 # Query # # use `test`; INSERT INTO tt_1(trans_id, stmt_id) VALUES (361, 5)
2261-master-bin.000001 # Query # # ROLLBACK
2262 -e-e-e-e-e-e-e-e-e-e-e- >> B N CT T R << -e-e-e-e-e-e-e-e-e-e-e-
2263
2264 rpl_mixing_engines.inc [commands=drop-CT]
2265
2266=== renamed file 'mysql-test/suite/rpl/r/rpl_drop_temp.result' => 'mysql-test/suite/rpl/r/rpl_stm_drop_temp.result'
2267=== modified file 'mysql-test/suite/rpl/r/rpl_stm_innodb.result'
2268--- mysql-test/suite/rpl/r/rpl_stm_innodb.result 2013-12-05 17:23:10 +0000
2269+++ mysql-test/suite/rpl/r/rpl_stm_innodb.result 2014-10-25 19:41:47 +0000
2270@@ -79,7 +79,8 @@
2271 ERROR 42S02: Table 'mysqltest1.tmp' doesn't exist
2272 SHOW CREATE TABLE mysqltest1.tmp2;
2273 ERROR 42S02: Table 'mysqltest1.tmp2' doesn't exist
2274-######### t1 has two rows here: the transaction not rolled back since t1 uses MyISAM #########
2275+######### for SBR, t1 has two rows here: the transaction not rolled back since t1 uses MyISAM #########
2276+######### for MBR, t1 has one row here: the transaction not rolled back since t1 uses MyISAM #########
2277 SELECT COUNT(*) FROM mysqltest1.t1;
2278 COUNT(*)
2279 2
2280
2281=== renamed file 'mysql-test/suite/rpl/r/rpl_rewrt_db.result' => 'mysql-test/suite/rpl/r/rpl_stm_rewrt_db.result'
2282=== modified file 'mysql-test/suite/rpl/r/rpl_stop_slave.result'
2283--- mysql-test/suite/rpl/r/rpl_stop_slave.result 2014-08-22 10:02:24 +0000
2284+++ mysql-test/suite/rpl/r/rpl_stop_slave.result 2014-10-25 19:41:47 +0000
2285@@ -83,51 +83,4 @@
2286 call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
2287 [connection master]
2288 DROP TABLE t1, t2;
2289-
2290-# Bug#58546 test rpl_packet timeout failure sporadically on PB
2291-# ----------------------------------------------------------------------
2292-# STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
2293-# possible that IO thread stopped after replicating part of a transaction
2294-# which SQL thread was executing. SQL thread would be hung if the
2295-# transaction could not be rolled back safely.
2296-# It caused some sporadic failures on PB2.
2297-#
2298-# This test verifies that when 'STOP SLAVE' is issued by a user, IO
2299-# thread will continue to fetch the rest events of the transaction which
2300-# is being executed by SQL thread and is not able to be rolled back safely.
2301-CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
2302-CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
2303-INSERT INTO t1 VALUES(1, 1);
2304-include/sync_slave_sql_with_master.inc
2305-include/stop_slave.inc
2306-[connection master]
2307-include/stop_dump_threads.inc
2308-SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
2309-[connection slave]
2310-include/start_slave.inc
2311-BEGIN;
2312-UPDATE t1 SET c2 = 2 WHERE c1 = 1;
2313-[connection master]
2314-BEGIN;
2315-INSERT INTO t1 VALUES(2, 2);
2316-INSERT INTO t2 VALUES(1);
2317-UPDATE t1 SET c2 = 3 WHERE c1 = 1;
2318-COMMIT;
2319-[connection slave1]
2320-STOP SLAVE;
2321-[connection slave]
2322-ROLLBACK;
2323-[connection master]
2324-SET DEBUG_SYNC= 'now SIGNAL signal.continue';
2325-SET DEBUG_SYNC= 'RESET';
2326-[connection slave]
2327-include/wait_for_slave_to_stop.inc
2328-[connection slave1]
2329-[connection master]
2330-SET GLOBAL debug= '$debug_save';
2331-include/stop_dump_threads.inc
2332-[connection slave1]
2333-include/start_slave.inc
2334-[connection master]
2335-DROP TABLE t1, t2;
2336 include/rpl_end.inc
2337
2338=== modified file 'mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result'
2339--- mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result 2014-06-04 14:48:06 +0000
2340+++ mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result 2014-10-25 19:41:47 +0000
2341@@ -13,7 +13,7 @@
2342 ==== Verify results on slave ====
2343 SHOW STATUS LIKE "Slave_open_temp_tables";
2344 Variable_name Value
2345-Slave_open_temp_tables 1
2346+Slave_open_temp_tables 0
2347 [on master]
2348 [on master1]
2349 [on slave]
2350@@ -42,7 +42,7 @@
2351 include/sync_slave_sql_with_master.inc
2352 SHOW STATUS LIKE 'Slave_open_temp_tables';
2353 Variable_name Value
2354-Slave_open_temp_tables 1
2355+Slave_open_temp_tables 0
2356 DROP TABLE t1_tmp, t2;
2357 INSERT INTO t1 VALUES (1);
2358 DROP TEMPORARY TABLE t2_tmp;
2359@@ -60,13 +60,10 @@
2360 slave-bin.000001 # Query # # use `test`; CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) )
2361 slave-bin.000001 # Query # # use `test`; CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) )
2362 slave-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t2 FOR EACH ROW INSERT INTO t3 () VALUES ()
2363-slave-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE t1_tmp (i1 int)
2364-slave-bin.000001 # Query # # use `test`; ALTER TABLE t1_tmp ADD COLUMN b INT
2365 slave-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t1_tmp` /* generated by server */
2366 slave-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
2367 slave-bin.000001 # Query # # BEGIN
2368-slave-bin.000001 # Table_map # # table_id: # (test.t1)
2369-slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
2370+slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1)
2371 slave-bin.000001 # Xid # # COMMIT /* XID */
2372 slave-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t2_tmp` /* generated by server */
2373 slave-bin.000001 # Query # # BEGIN
2374
2375=== added file 'mysql-test/suite/rpl/t/rpl_bug58546.test'
2376--- mysql-test/suite/rpl/t/rpl_bug58546.test 1970-01-01 00:00:00 +0000
2377+++ mysql-test/suite/rpl/t/rpl_bug58546.test 2014-10-25 19:41:47 +0000
2378@@ -0,0 +1,69 @@
2379+source include/master-slave.inc;
2380+source include/have_innodb.inc;
2381+source include/have_debug.inc;
2382+source include/have_debug_sync.inc;
2383+source include/have_binlog_format_mixed_or_statement.inc;
2384+
2385+--echo
2386+--echo # Bug#58546 test rpl_packet timeout failure sporadically on PB
2387+--echo # ----------------------------------------------------------------------
2388+--echo # STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
2389+--echo # possible that IO thread stopped after replicating part of a transaction
2390+--echo # which SQL thread was executing. SQL thread would be hung if the
2391+--echo # transaction could not be rolled back safely.
2392+--echo # It caused some sporadic failures on PB2.
2393+--echo #
2394+--echo # This test verifies that when 'STOP SLAVE' is issued by a user, IO
2395+--echo # thread will continue to fetch the rest events of the transaction which
2396+--echo # is being executed by SQL thread and is not able to be rolled back safely.
2397+
2398+CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
2399+CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
2400+INSERT INTO t1 VALUES(1, 1);
2401+
2402+sync_slave_with_master;
2403+
2404+--source include/rpl_connection_master.inc
2405+
2406+let $debug_save= `SELECT @@GLOBAL.debug`;
2407+SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
2408+
2409+--source include/rpl_connection_slave.inc
2410+source include/restart_slave_sql.inc;
2411+
2412+BEGIN;
2413+UPDATE t1 SET c2 = 2 WHERE c1 = 1;
2414+
2415+--source include/rpl_connection_master.inc
2416+BEGIN;
2417+INSERT INTO t1 VALUES(2, 2);
2418+INSERT INTO t2 VALUES(1);
2419+UPDATE t1 SET c2 = 3 WHERE c1 = 1;
2420+COMMIT;
2421+
2422+--source include/rpl_connection_slave1.inc
2423+let $show_statement= SHOW PROCESSLIST;
2424+let $field= Info;
2425+let $condition= = 'UPDATE t1 SET c2 = 3 WHERE c1 = 1';
2426+source include/wait_show_condition.inc;
2427+
2428+send STOP SLAVE;
2429+
2430+--source include/rpl_connection_slave.inc
2431+ROLLBACK;
2432+
2433+--source include/rpl_connection_master.inc
2434+SET DEBUG_SYNC= 'now SIGNAL signal.continue';
2435+SET DEBUG_SYNC= 'RESET';
2436+
2437+--source include/rpl_connection_slave.inc
2438+source include/wait_for_slave_to_stop.inc;
2439+
2440+--source include/rpl_connection_slave1.inc
2441+reap;
2442+source include/start_slave.inc;
2443+
2444+--source include/rpl_connection_master.inc
2445+DROP TABLE t1, t2;
2446+SET GLOBAL debug= $debug_save;
2447+--source include/rpl_end.inc
2448
2449=== modified file 'mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test'
2450--- mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test 2013-09-26 19:59:56 +0000
2451+++ mysql-test/suite/rpl/t/rpl_create_tmp_table_if_not_exists.test 2014-10-25 19:41:47 +0000
2452@@ -24,8 +24,9 @@
2453
2454 source include/master-slave.inc;
2455 #CREATE TEMPORARY TABLE statements are not binlogged in row mode,
2456+#nor in mixed mode
2457 #So it must be test by itself.
2458-source include/have_binlog_format_mixed_or_statement.inc;
2459+source include/have_binlog_format_statement.inc;
2460 source include/not_gtid_enabled.inc;
2461
2462 disable_warnings;
2463
2464=== modified file 'mysql-test/suite/rpl/t/rpl_gtid_empty_transaction.test'
2465--- mysql-test/suite/rpl/t/rpl_gtid_empty_transaction.test 2014-06-04 14:48:06 +0000
2466+++ mysql-test/suite/rpl/t/rpl_gtid_empty_transaction.test 2014-10-25 19:41:47 +0000
2467@@ -91,8 +91,8 @@
2468 INSERT INTO t_ignore_wild VALUES (1, 2);
2469 DROP TEMPORARY TABLE t_ignore_wild;
2470
2471-# Verify that 8 GTIDs were generated.
2472---let $gtid_step_count= 8
2473+# Verify that 2 GTIDs were generated.
2474+--let $gtid_step_count= 2
2475 --source include/gtid_step_assert.inc
2476
2477 # Verify that the GTIDs make it to every slave.
2478@@ -181,8 +181,8 @@
2479 ALTER TABLE t2 ADD COLUMN b INT;
2480 INSERT INTO t2 VALUES (1, 2);
2481
2482-# assert exactly 3 GTIDs were generated
2483---let $gtid_step_count= 3
2484+# assert exactly 0 GTIDs were generated
2485+--let $gtid_step_count= 0
2486 --source include/gtid_step_assert.inc
2487
2488 # Verify that the GTID gets replicated everywhere.
2489
2490=== added file 'mysql-test/suite/rpl/t/rpl_mix_drop_temp-slave.opt'
2491--- mysql-test/suite/rpl/t/rpl_mix_drop_temp-slave.opt 1970-01-01 00:00:00 +0000
2492+++ mysql-test/suite/rpl/t/rpl_mix_drop_temp-slave.opt 2014-10-25 19:41:47 +0000
2493@@ -0,0 +1,2 @@
2494+--replicate-ignore-table=mysqltest.t2
2495+
2496
2497=== added file 'mysql-test/suite/rpl/t/rpl_mix_drop_temp.test'
2498--- mysql-test/suite/rpl/t/rpl_mix_drop_temp.test 1970-01-01 00:00:00 +0000
2499+++ mysql-test/suite/rpl/t/rpl_mix_drop_temp.test 2014-10-25 19:41:47 +0000
2500@@ -0,0 +1,7 @@
2501+source include/not_gtid_enabled.inc;
2502+source include/master-slave.inc;
2503+source include/have_binlog_format_mixed.inc;
2504+
2505+source extra/rpl_tests/rpl_drop_temp.test;
2506+
2507+source include/rpl_end.inc;
2508
2509=== added file 'mysql-test/suite/rpl/t/rpl_mix_innodb.test'
2510--- mysql-test/suite/rpl/t/rpl_mix_innodb.test 1970-01-01 00:00:00 +0000
2511+++ mysql-test/suite/rpl/t/rpl_mix_innodb.test 2014-10-25 19:41:47 +0000
2512@@ -0,0 +1,11 @@
2513+# File for specialities regarding replication from or to InnoDB
2514+# tables.
2515+
2516+source include/master-slave.inc;
2517+source include/have_innodb.inc;
2518+source include/have_binlog_format_mixed.inc;
2519+# gtids disabled because it tests DROP TEMPORARY inside a transaction
2520+source include/not_gtid_enabled.inc;
2521+
2522+source extra/rpl_tests/rpl_innodb.test;
2523+--source include/rpl_end.inc
2524
2525=== added file 'mysql-test/suite/rpl/t/rpl_mix_rewrt_db-slave.opt'
2526--- mysql-test/suite/rpl/t/rpl_mix_rewrt_db-slave.opt 1970-01-01 00:00:00 +0000
2527+++ mysql-test/suite/rpl/t/rpl_mix_rewrt_db-slave.opt 2014-10-25 19:41:47 +0000
2528@@ -0,0 +1,1 @@
2529+"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test" "--replicate-rewrite-db=database_master_temp_01->database_slave_temp_01" "--replicate-rewrite-db=database_master_temp_02->database_slave_temp_02" "--replicate-rewrite-db=database_master_temp_03->database_slave_temp_03"
2530
2531=== added file 'mysql-test/suite/rpl/t/rpl_mix_rewrt_db.test'
2532--- mysql-test/suite/rpl/t/rpl_mix_rewrt_db.test 1970-01-01 00:00:00 +0000
2533+++ mysql-test/suite/rpl/t/rpl_mix_rewrt_db.test 2014-10-25 19:41:47 +0000
2534@@ -0,0 +1,7 @@
2535+# TBF - difference in row level logging
2536+-- source include/have_binlog_format_mixed.inc
2537+-- source include/master-slave.inc
2538+
2539+-- source extra/rpl_tests/rpl_rewrt_db.test
2540+
2541+-- source include/rpl_end.inc
2542
2543=== modified file 'mysql-test/suite/rpl/t/rpl_row_reset_slave.test'
2544--- mysql-test/suite/rpl/t/rpl_row_reset_slave.test 2007-06-27 12:28:02 +0000
2545+++ mysql-test/suite/rpl/t/rpl_row_reset_slave.test 2014-10-25 19:41:47 +0000
2546@@ -1,5 +1,5 @@
2547 # TBF - difference in row level logging
2548-# Temp tables are not replicated in rbr, but it is still good to hit rbr with everthing
2549--- source include/have_binlog_format_row.inc
2550+# Temp tables are not replicated in rbr or mixed, but it is still good to hit rbr with everthing
2551+-- source include/have_binlog_format_mixed_or_row.inc
2552 -- source extra/rpl_tests/rpl_reset_slave.test
2553
2554
2555=== renamed file 'mysql-test/suite/rpl/t/rpl_drop_temp-slave.opt' => 'mysql-test/suite/rpl/t/rpl_stm_drop_temp-slave.opt'
2556=== added file 'mysql-test/suite/rpl/t/rpl_stm_drop_temp.test'
2557--- mysql-test/suite/rpl/t/rpl_stm_drop_temp.test 1970-01-01 00:00:00 +0000
2558+++ mysql-test/suite/rpl/t/rpl_stm_drop_temp.test 2014-10-25 19:41:47 +0000
2559@@ -0,0 +1,7 @@
2560+source include/not_gtid_enabled.inc;
2561+source include/master-slave.inc;
2562+source include/have_binlog_format_statement.inc;
2563+
2564+source extra/rpl_tests/rpl_drop_temp.test;
2565+
2566+source include/rpl_end.inc;
2567
2568=== modified file 'mysql-test/suite/rpl/t/rpl_stm_innodb.test'
2569--- mysql-test/suite/rpl/t/rpl_stm_innodb.test 2012-02-08 13:28:38 +0000
2570+++ mysql-test/suite/rpl/t/rpl_stm_innodb.test 2014-10-25 19:41:47 +0000
2571@@ -3,7 +3,7 @@
2572
2573 source include/master-slave.inc;
2574 source include/have_innodb.inc;
2575-source include/have_binlog_format_mixed_or_statement.inc;
2576+source include/have_binlog_format_statement.inc;
2577 # gtids disabled because it tests DROP TEMPORARY inside a transaction
2578 source include/not_gtid_enabled.inc;
2579
2580
2581=== modified file 'mysql-test/suite/rpl/t/rpl_stm_reset_slave.test'
2582--- mysql-test/suite/rpl/t/rpl_stm_reset_slave.test 2007-06-27 12:28:02 +0000
2583+++ mysql-test/suite/rpl/t/rpl_stm_reset_slave.test 2014-10-25 19:41:47 +0000
2584@@ -1,5 +1,5 @@
2585 # TBF - difference in row level logging
2586--- source include/have_binlog_format_mixed_or_statement.inc
2587+-- source include/have_binlog_format_statement.inc
2588 -- source extra/rpl_tests/rpl_reset_slave.test
2589
2590 # End of 4.1 tests
2591
2592=== renamed file 'mysql-test/suite/rpl/t/rpl_rewrt_db-slave.opt' => 'mysql-test/suite/rpl/t/rpl_stm_rewrt_db-slave.opt'
2593=== added file 'mysql-test/suite/rpl/t/rpl_stm_rewrt_db.test'
2594--- mysql-test/suite/rpl/t/rpl_stm_rewrt_db.test 1970-01-01 00:00:00 +0000
2595+++ mysql-test/suite/rpl/t/rpl_stm_rewrt_db.test 2014-10-25 19:41:47 +0000
2596@@ -0,0 +1,7 @@
2597+# TBF - difference in row level logging
2598+-- source include/have_binlog_format_statement.inc
2599+-- source include/master-slave.inc
2600+
2601+-- source extra/rpl_tests/rpl_rewrt_db.test
2602+
2603+-- source include/rpl_end.inc
2604
2605=== modified file 'mysql-test/suite/rpl/t/rpl_stop_slave.test'
2606--- mysql-test/suite/rpl/t/rpl_stop_slave.test 2014-08-22 10:02:24 +0000
2607+++ mysql-test/suite/rpl/t/rpl_stop_slave.test 2014-10-25 19:41:47 +0000
2608@@ -5,7 +5,10 @@
2609 source include/have_innodb.inc;
2610 source include/have_debug.inc;
2611 source include/have_debug_sync.inc;
2612-source include/have_binlog_format_mixed_or_statement.inc;
2613+
2614+# lp:1313901 renders this case irrelevant for mixed mode as temp tables are no
2615+# longer replicated to the slave.
2616+source include/have_binlog_format_statement.inc;
2617 source include/not_gtid_enabled.inc;
2618
2619 --echo
2620@@ -59,91 +62,8 @@
2621 --source include/rpl_connection_master.inc
2622 DROP TABLE t1, t2;
2623
2624---echo
2625---echo # Bug#58546 test rpl_packet timeout failure sporadically on PB
2626---echo # ----------------------------------------------------------------------
2627---echo # STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
2628---echo # possible that IO thread stopped after replicating part of a transaction
2629---echo # which SQL thread was executing. SQL thread would be hung if the
2630---echo # transaction could not be rolled back safely.
2631---echo # It caused some sporadic failures on PB2.
2632---echo #
2633---echo # This test verifies that when 'STOP SLAVE' is issued by a user, IO
2634---echo # thread will continue to fetch the rest events of the transaction which
2635---echo # is being executed by SQL thread and is not able to be rolled back safely.
2636-
2637-CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
2638-CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
2639-INSERT INTO t1 VALUES(1, 1);
2640-
2641---source include/sync_slave_sql_with_master.inc
2642---source include/stop_slave.inc
2643-
2644---source include/rpl_connection_master.inc
2645-# make sure that there are no zombie threads
2646---source include/stop_dump_threads.inc
2647-
2648-let $debug_save= `SELECT @@GLOBAL.debug`;
2649-SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
2650-
2651---source include/rpl_connection_slave.inc
2652---source include/start_slave.inc
2653-
2654-BEGIN;
2655-UPDATE t1 SET c2 = 2 WHERE c1 = 1;
2656-
2657---source include/rpl_connection_master.inc
2658-BEGIN;
2659-INSERT INTO t1 VALUES(2, 2);
2660-INSERT INTO t2 VALUES(1);
2661-UPDATE t1 SET c2 = 3 WHERE c1 = 1;
2662-COMMIT;
2663-
2664-# wait for the dump thread reach the sync point
2665---let $wait_condition= select count(*)=1 from information_schema.processlist where state LIKE '%debug sync point%' and command='Binlog Dump'
2666---source include/wait_condition.inc
2667-
2668---source include/rpl_connection_slave1.inc
2669-let $show_statement= SHOW PROCESSLIST;
2670-let $field= Info;
2671-let $condition= = 'UPDATE t1 SET c2 = 3 WHERE c1 = 1';
2672-source include/wait_show_condition.inc;
2673-
2674-send STOP SLAVE;
2675-
2676---source include/rpl_connection_slave.inc
2677-ROLLBACK;
2678-
2679---source include/rpl_connection_master.inc
2680-
2681-SET DEBUG_SYNC= 'now SIGNAL signal.continue';
2682-# wait for the dump thread to come out of the
2683-# waiting phase before resetting the signals
2684---let $wait_condition= select count(*)=0 from information_schema.processlist where state LIKE '%debug sync point%' and command='Binlog Dump'
2685---source include/wait_condition.inc
2686-SET DEBUG_SYNC= 'RESET';
2687-
2688---source include/rpl_connection_slave.inc
2689-source include/wait_for_slave_to_stop.inc;
2690-
2691---source include/rpl_connection_slave1.inc
2692-reap;
2693-
2694-# Slave has stopped, thence lets make sure that
2695-# we kill the zombie dump threads. Also, make
2696-# sure that we disable the DBUG_EXECUTE_IF
2697-# that would set the dump thread to wait
2698---source include/rpl_connection_master.inc
2699-SET GLOBAL debug= '$debug_save';
2700-# make sure that there are no zombie threads
2701---source include/stop_dump_threads.inc
2702-
2703---source include/rpl_connection_slave1.inc
2704-# now the dump thread on the master will start
2705-# from a clean slate, i.e. without the
2706-# DBUG_EXECUTE_IF set
2707-source include/start_slave.inc;
2708-
2709---source include/rpl_connection_master.inc
2710-DROP TABLE t1, t2;
2711+# Bug#58546 test rpl_packet timeout failure sporadically on PB
2712+# Moved into its own test rpl.rpl_bug58546.test to allow it to continue
2713+# to test both MBR and SBR
2714+
2715 --source include/rpl_end.inc
2716
2717=== modified file 'mysql-test/suite/rpl/t/rpl_trunc_temp.test'
2718--- mysql-test/suite/rpl/t/rpl_trunc_temp.test 2014-06-04 14:48:06 +0000
2719+++ mysql-test/suite/rpl/t/rpl_trunc_temp.test 2014-10-25 19:41:47 +0000
2720@@ -20,8 +20,9 @@
2721
2722
2723 # Requires statement-based logging since temporary tables are not
2724-# logged in row-based logging
2725--- source include/have_binlog_format_mixed_or_statement.inc
2726+# logged in row-based logging. Same now goes for mixed, valid for statement
2727+# only replication as a result of lp:1313901
2728+-- source include/have_binlog_format_statement.inc
2729
2730 source include/master-slave.inc;
2731
2732
2733=== modified file 'sql/binlog.cc'
2734--- sql/binlog.cc 2014-09-25 14:16:07 +0000
2735+++ sql/binlog.cc 2014-10-25 19:41:47 +0000
2736@@ -8091,6 +8091,11 @@
2737 */
2738 my_bool multi_access_engine= FALSE;
2739 /*
2740+ bug 1313901 : Track if statement creates or drops a temporary table
2741+ and log in ROW if it does.
2742+ */
2743+ my_bool create_drop_temp_table= FALSE;
2744+ /*
2745 Identifies if a table is changed.
2746 */
2747 my_bool is_write= FALSE;
2748@@ -8156,7 +8161,25 @@
2749 for (TABLE_LIST *table= tables; table; table= table->next_global)
2750 {
2751 if (table->placeholder())
2752- continue;
2753+ {
2754+ /*
2755+ bug 1313901 : Detect if this is a CREATE TEMPORARY or DROP of a
2756+ temporary table. This will be used later in determining
2757+ whether to log in ROW or STMT if MIXED replication is
2758+ being used.
2759+ */
2760+ if(!create_drop_temp_table &&
2761+ !table->table &&
2762+ ((lex->sql_command == SQLCOM_CREATE_TABLE &&
2763+ (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) ||
2764+ ((lex->sql_command == SQLCOM_DROP_TABLE ||
2765+ lex->sql_command == SQLCOM_TRUNCATE) &&
2766+ find_temporary_table(this, table))))
2767+ {
2768+ create_drop_temp_table= TRUE;
2769+ }
2770+ continue;
2771+ }
2772
2773 handler::Table_flags const flags= table->table->file->ha_table_flags();
2774
2775@@ -8229,17 +8252,12 @@
2776 }
2777 flags_access_some_set |= flags;
2778
2779- if (lex->sql_command != SQLCOM_CREATE_TABLE ||
2780- (lex->sql_command == SQLCOM_CREATE_TABLE &&
2781- (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)))
2782- {
2783- if (table->table->s->tmp_table)
2784- lex->set_stmt_accessed_table(trans ? LEX::STMT_READS_TEMP_TRANS_TABLE :
2785- LEX::STMT_READS_TEMP_NON_TRANS_TABLE);
2786- else
2787- lex->set_stmt_accessed_table(trans ? LEX::STMT_READS_TRANS_TABLE :
2788- LEX::STMT_READS_NON_TRANS_TABLE);
2789- }
2790+ if (table->table->s->tmp_table)
2791+ lex->set_stmt_accessed_table(trans ? LEX::STMT_READS_TEMP_TRANS_TABLE :
2792+ LEX::STMT_READS_TEMP_NON_TRANS_TABLE);
2793+ else
2794+ lex->set_stmt_accessed_table(trans ? LEX::STMT_READS_TRANS_TABLE :
2795+ LEX::STMT_READS_NON_TRANS_TABLE);
2796
2797 if (prev_access_table && prev_access_table->file->ht !=
2798 table->table->file->ht)
2799@@ -8379,7 +8397,11 @@
2800 else
2801 {
2802 if (lex->is_stmt_unsafe() || lex->is_stmt_row_injection()
2803- || (flags_write_all_set & HA_BINLOG_STMT_CAPABLE) == 0)
2804+ || (flags_write_all_set & HA_BINLOG_STMT_CAPABLE) == 0
2805+ || (flags_write_all_set & HA_BINLOG_STMT_CAPABLE) == 0
2806+ || lex->stmt_accessed_table(LEX::STMT_READS_TEMP_TRANS_TABLE)
2807+ || lex->stmt_accessed_table(LEX::STMT_READS_TEMP_NON_TRANS_TABLE)
2808+ || create_drop_temp_table)
2809 {
2810 /* log in row format! */
2811 set_current_stmt_binlog_format_row_if_mixed();
2812
2813=== modified file 'sql/sql_class.h'
2814--- sql/sql_class.h 2014-09-25 14:16:07 +0000
2815+++ sql/sql_class.h 2014-10-25 19:41:47 +0000
2816@@ -3957,30 +3957,15 @@
2817 inline void reset_current_stmt_binlog_format_row()
2818 {
2819 DBUG_ENTER("reset_current_stmt_binlog_format_row");
2820- /*
2821- If there are temporary tables, don't reset back to
2822- statement-based. Indeed it could be that:
2823- CREATE TEMPORARY TABLE t SELECT UUID(); # row-based
2824- # and row-based does not store updates to temp tables
2825- # in the binlog.
2826- INSERT INTO u SELECT * FROM t; # stmt-based
2827- and then the INSERT will fail as data inserted into t was not logged.
2828- So we continue with row-based until the temp table is dropped.
2829- If we are in a stored function or trigger, we mustn't reset in the
2830- middle of its execution (as the binary logging way of a stored function
2831- or trigger is decided when it starts executing, depending for example on
2832- the caller (for a stored function: if caller is SELECT or
2833- INSERT/UPDATE/DELETE...).
2834- */
2835 DBUG_PRINT("debug",
2836- ("temporary_tables: %s, in_sub_stmt: %s, system_thread: %s",
2837- YESNO(temporary_tables), YESNO(in_sub_stmt),
2838+ ("in_sub_stmt: %s, system_thread: %s",
2839+ YESNO(in_sub_stmt),
2840 show_system_thread(system_thread)));
2841 if (in_sub_stmt == 0)
2842 {
2843 if (variables.binlog_format == BINLOG_FORMAT_ROW)
2844 set_current_stmt_binlog_format_row();
2845- else if (temporary_tables == NULL)
2846+ else
2847 clear_current_stmt_binlog_format_row();
2848 }
2849 DBUG_VOID_RETURN;
2850
2851=== modified file 'sql/sql_table.cc'
2852--- sql/sql_table.cc 2014-09-26 04:43:24 +0000
2853+++ sql/sql_table.cc 2014-10-25 19:41:47 +0000
2854@@ -2099,6 +2099,15 @@
2855
2856 DBUG_ENTER("mysql_rm_table");
2857
2858+ /*
2859+ bug 1313901 : DROP tables need to have their logging format determined if
2860+ in MIXED mode and dropping a TEMP table.
2861+ */
2862+ if (thd->decide_logging_format(tables))
2863+ {
2864+ DBUG_RETURN(TRUE);
2865+ }
2866+
2867 /* Disable drop of enabled log tables, must be done before name locking */
2868 for (table= tables; table; table= table->next_local)
2869 {
2870@@ -5103,7 +5112,9 @@
2871 To check the existence of table, lock of type "S" is obtained on the table
2872 and then it is upgraded to "X" if table does not exists.
2873 */
2874- if (open_tables(thd, &thd->lex->query_tables, &not_used, 0))
2875+
2876+ if (open_tables(thd, &thd->lex->query_tables, &not_used, 0) ||
2877+ thd->decide_logging_format(thd->lex->query_tables))
2878 {
2879 /* is_error() may be 0 if table existed and we generated a warning */
2880 result= thd->is_error();
2881@@ -5362,8 +5373,12 @@
2882 that we can safely perform table creation.
2883 Thus by holding both these locks we ensure that our statement is
2884 properly isolated from all concurrent operations which matter.
2885+
2886+ bug 1313901 : CREATE LIKE needs to have the logging format determined if
2887+ in MIXED mode and creating LIKE a TEMP table.
2888 */
2889- if (open_tables(thd, &thd->lex->query_tables, &not_used, 0))
2890+ if (open_tables(thd, &thd->lex->query_tables, &not_used, 0) ||
2891+ thd->decide_logging_format(thd->lex->query_tables))
2892 {
2893 res= thd->is_error();
2894 goto err;
2895
2896=== modified file 'sql/sql_truncate.cc'
2897--- sql/sql_truncate.cc 2014-08-22 13:31:49 +0000
2898+++ sql/sql_truncate.cc 2014-10-25 19:41:47 +0000
2899@@ -427,6 +427,13 @@
2900 if (is_temporary_table(table_ref))
2901 {
2902 TABLE *tmp_table= table_ref->table;
2903+ /*
2904+ bug 1313901 : THD::decide_logging_format has not yet been called and
2905+ may not be called at all dependig on the engine, so call it
2906+ here.
2907+ */
2908+ if (thd->decide_logging_format(table_ref) != 0)
2909+ DBUG_RETURN(TRUE);
2910
2911 /* In RBR, the statement is not binlogged if the table is temporary. */
2912 binlog_stmt= !thd->is_current_stmt_binlog_format_row();

Subscribers

People subscribed via source and target branches