1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-28 13:01:41 +03:00
mariadb/mysql-test/extra/rpl_tests/rpl_truncate_helper.test
Sven Sandberg 78a3abeced BUG#38350: Many tests don't clean up after themselves on exit.
Problem: Many test cases don't clean up after themselves (fail
to drop tables or fail to reset variables). This implies that:
(1) check-testcase in the new mtr that currently lives in
5.1-rpl failed. (2) it may cause unexpected results in
subsequent tests.
Fix: make all tests clean up.
Also: cleaned away unnecessary output in rpl_packet.result
Also: fixed bug where rpl_log called RESET MASTER with a running
slave. This is not supposed to work.
Also: removed unnecessary code from rpl_stm_EE_err2 and made it
verify that an error occurred.
Also: removed unnecessary code from rpl_ndb_ctype_ucs2_def.
2008-11-13 20:19:00 +01:00

48 lines
1.1 KiB
Plaintext

connection slave;
STOP SLAVE;
source include/wait_for_slave_to_stop.inc;
connection master;
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
connection slave;
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
RESET SLAVE;
START SLAVE;
--echo **** On Master ****
connection master;
SET @old_session_binlog_format= @@session.binlog_format;
SET @old_global_binlog_format= @@global.binlog_format;
eval SET SESSION BINLOG_FORMAT=$format;
eval SET GLOBAL BINLOG_FORMAT=$format;
eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine;
INSERT INTO t1 VALUES (1,1), (2,2);
SELECT * FROM t1;
--echo **** On Slave ****
sync_slave_with_master;
INSERT INTO t1 VALUE (3,3);
SELECT * FROM t1;
--echo **** On Master ****
connection master;
eval $stmt t1;
SELECT * FROM t1;
--echo **** On Slave ****
sync_slave_with_master;
# Should be empty
SELECT * FROM t1;
--echo **** On Master ****
connection master;
DROP TABLE t1;
let $SERVER_VERSION=`select version()`;
source include/show_binlog_events.inc;
connection master;
RESET MASTER;
SET @@session.binlog_format= @old_session_binlog_format;
SET @@global.binlog_format= @old_global_binlog_format;