88
93
# 10. in the end the slave should not have open temp tables.
91
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
96
--source include/rpl_reset.inc
92
97
-- connection master
94
99
# action: setup environment
146
150
-- sync_slave_with_master
148
152
-- source include/show_binlog_events.inc
155
--echo # Bug#55478 Row events wrongly apply on the temporary table of the same name
156
--echo # ==========================================================================
159
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
160
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
162
--echo # The statement should be binlogged
163
CREATE TEMPORARY TABLE t1(c1 INT) ENGINE=InnoDB;
166
--echo # Case 1: CREATE TABLE t1 ... SELECT
167
--echo # ----------------------------------
168
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
169
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
172
--echo # The statement generates row events on t1. And the rows events should
173
--echo # be inserted into the base table on slave.
174
CREATE TABLE t1 ENGINE=MyISAM SELECT rand();
176
source include/show_binlog_events.inc;
177
let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
178
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
181
--echo # Case 2: DROP TEMPORARY TABLE in a transacation(happens only on 5.5+)
182
--echo # --------------------------------------------------------------------
186
DROP TEMPORARY TABLE t1;
188
--echo # The statement will binlogged after 'DROP TEMPORARY TABLE t1'
189
INSERT INTO t1 VALUES(1);
191
--echo # The rows event will binlogged after 'INSERT INTO t1 VALUES(1)'
192
INSERT INTO t1 VALUES(Rand());
195
source include/show_binlog_events.inc;
197
--sync_slave_with_master
199
--echo # Compare the base table.
200
--let $diff_tables= master:t1, slave:t1
201
--source include/diff_tables.inc
206
--source include/rpl_end.inc