Commit 78a3abec authored by Sven Sandberg's avatar Sven Sandberg
Browse files

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.
parent 2618337e
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -146,10 +146,9 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines;
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
drop table t2;
drop table t1, t2;
connection master;
drop table t2;
drop table t1;
drop table t1, t2;

# BUG#17233 LOAD DATA INFILE: failure causes mysqld dbug_assert, binlog not flushed
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
@@ -157,8 +156,6 @@ CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
--error ER_DUP_ENTRY
LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1;

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

# End of 4.1 tests
+7 −2
Original line number Diff line number Diff line
@@ -18,13 +18,18 @@ eval create table t1 (a int, unique(a)) engine=$engine_type;
set sql_log_bin=0;
insert into t1 values(2);
set sql_log_bin=1;
save_master_pos;

--error ER_DUP_ENTRY
insert into t1 values(1),(2);
drop table t1;
save_master_pos;

connection slave;
--source include/wait_for_slave_sql_to_stop.inc
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
--echo Error: "$error" (expected different error codes on master and slave)
--echo Errno: "$errno" (expected 0)
drop table t1;

# End of 4.1 tests
+5 −0
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@ 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;

@@ -40,3 +43,5 @@ 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;
+1 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";

# Final cleanup
eval set GLOBAL query_cache_size=$save_query_cache_size;
connection default;
drop table t2;
disconnect connection1;
+1 −0
Original line number Diff line number Diff line
@@ -218,4 +218,5 @@ Qcache_queries_in_cache 1
show status like "Qcache_hits";
Variable_name	Value
Qcache_hits	2
set GLOBAL query_cache_size=1048576;
drop table t2;
Loading