| 1 |
############################################## |
| 2 |
# Change Author: JBM |
| 3 |
# Change Date: 2006-02-07 |
| 4 |
# Change: Added ENGINE=MyISAM |
| 5 |
############################################## |
| 6 |
source include/have_binlog_format_mixed_or_statement.inc; |
| 7 |
source include/master-slave.inc; |
| 8 |
|
| 9 |
--disable_warnings |
| 10 |
create database if not exists mysqltest; |
| 11 |
--enable_warnings |
| 12 |
|
| 13 |
connect (con_temp,127.0.0.1,root,,test,$MASTER_MYPORT,); |
| 14 |
|
| 15 |
connection con_temp; |
| 16 |
use mysqltest; |
| 17 |
create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; |
| 18 |
create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; |
| 19 |
|
| 20 |
disconnect con_temp; |
| 21 |
--source include/wait_until_disconnected.inc |
| 22 |
|
| 23 |
connection master; |
| 24 |
-- let $wait_binlog_event= DROP |
| 25 |
-- source include/wait_for_binlog_event.inc |
| 26 |
sync_slave_with_master; |
| 27 |
|
| 28 |
connection slave; |
| 29 |
show status like 'Slave_open_temp_tables'; |
| 30 |
# Cleanup |
| 31 |
connection master; |
| 32 |
drop database mysqltest; |
| 33 |
sync_slave_with_master; |
| 34 |
|
| 35 |
# |
| 36 |
# Bug#49137 |
| 37 |
# This test verifies if DROP MULTI TEMPORARY TABLE |
| 38 |
# will cause different errors on master and slave, |
| 39 |
# when one or more of these tables do not exist. |
| 40 |
# |
| 41 |
|
| 42 |
connection master; |
| 43 |
DROP TEMPORARY TABLE IF EXISTS tmp1; |
| 44 |
CREATE TEMPORARY TABLE t1 ( a int ); |
| 45 |
--error 1051 |
| 46 |
DROP TEMPORARY TABLE t1, t2; |
| 47 |
--error 1051 |
| 48 |
DROP TEMPORARY TABLE tmp2; |
| 49 |
sync_slave_with_master; |
| 50 |
|
| 51 |
connection slave; |
| 52 |
stop slave; |
| 53 |
wait_for_slave_to_stop; |
| 54 |
|
| 55 |
connection master; |
| 56 |
CREATE TEMPORARY TABLE tmp3 (a int); |
| 57 |
DROP TEMPORARY TABLE tmp3; |
| 58 |
|
| 59 |
connection slave; |
| 60 |
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; |
| 61 |
START SLAVE; |
| 62 |
|
| 63 |
connection master; |
| 64 |
sync_slave_with_master; |
| 65 |
|
| 66 |
|
| 67 |
# |
| 68 |
# BUG#54842: DROP TEMPORARY TABLE not binlogged after manual switching binlog format to ROW |
| 69 |
# |
| 70 |
|
| 71 |
--source include/rpl_reset.inc |
| 72 |
--connection master |
| 73 |
|
| 74 |
CREATE TABLE t1 ( i INT ); |
| 75 |
--sync_slave_with_master |
| 76 |
SHOW STATUS LIKE 'Slave_open_temp_tables'; |
| 77 |
|
| 78 |
--connect(con1,localhost,root,,) |
| 79 |
CREATE TEMPORARY TABLE ttmp1 ( i INT ); |
| 80 |
SET SESSION binlog_format=ROW; |
| 81 |
--disconnect con1 |
| 82 |
|
| 83 |
-- connection master |
| 84 |
--let $wait_binlog_event= DROP |
| 85 |
--source include/wait_for_binlog_event.inc |
| 86 |
--sync_slave_with_master |
| 87 |
SHOW STATUS LIKE 'Slave_open_temp_tables'; |
| 88 |
|
| 89 |
--connection master |
| 90 |
--source include/show_binlog_events.inc |
| 91 |
DROP TABLE t1; |
| 92 |
|
| 93 |
# End of 4.1 tests |
| 94 |
--source include/rpl_end.inc |