1--source include/have_innodb.inc 2--source include/have_log_bin.inc 3--source include/have_binlog_format_mixed_or_row.inc 4 5RESET MASTER; 6 7CREATE TABLE t1(a INT) ENGINE=InnoDB; 8CREATE TABLE t2(a INT) ENGINE=MyISAM; 9 10--source include/count_sessions.inc 11 12--connect(con1,localhost,root) 13 14SET @saved_binlog_format= @@SESSION.binlog_format; 15# A DROP for tmp10 should be binlogged because CREATE TABLE is 16SET SESSION binlog_format= 'STATEMENT'; 17CREATE TEMPORARY TABLE tmp10 (a INT); 18SET SESSION binlog_format= @saved_binlog_format; 19 20# No DROP should be logged for any of the statements below 21CREATE TEMPORARY TABLE tmp1 ENGINE=InnoDB SELECT * FROM t1; 22CREATE TEMPORARY TABLE tmp2 ENGINE=MyISAM SELECT * FROM t2; 23CREATE TEMPORARY TABLE tmp3 ENGINE=MyISAM SELECT * FROM t1; 24CREATE TEMPORARY TABLE tmp4 ENGINE=InnoDB SELECT * FROM t2; 25CREATE TEMPORARY TABLE tmp5 (a INT) ENGINE=InnoDB; 26CREATE TEMPORARY TABLE tmp6 (a INT) ENGINE=MyISAM; 27CREATE TEMPORARY TABLE tmp7 LIKE t1; 28CREATE TEMPORARY TABLE tmp8 LIKE t2; 29 30--disconnect con1 31--connection default 32--source include/wait_until_count_sessions.inc 33 34--source include/show_binlog_events.inc 35 36DROP TABLE t1, t2; 37