From: Serge Kozlov Date: April 13 2011 9:03pm Subject: bzr commit into mysql-trunk branch (Serge.Kozlov:3309) List-Archive: http://lists.mysql.com/commits/135366 Message-Id: <201104132104.p3DL4A8I025951@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0997151033==" --===============0997151033== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///home/ksm/oracle/repo/bugs_suite/mysql-trunk/ based on revid:davi.arnaut@stripped 3309 Serge Kozlov 2011-04-14 [merge] autocommit 5.5 -> trunk removed: mysql-test/suite/bugs/ mysql-test/suite/bugs/combinations mysql-test/suite/bugs/data/ mysql-test/suite/bugs/data/rpl_bug12691.dat mysql-test/suite/bugs/r/ mysql-test/suite/bugs/r/bug57108.result mysql-test/suite/bugs/r/rpl_bug12691.result mysql-test/suite/bugs/r/rpl_bug31582.result mysql-test/suite/bugs/r/rpl_bug31583.result mysql-test/suite/bugs/r/rpl_bug33029.result mysql-test/suite/bugs/r/rpl_bug38205.result mysql-test/suite/bugs/t/ mysql-test/suite/bugs/t/bug57108-master.opt mysql-test/suite/bugs/t/bug57108.test mysql-test/suite/bugs/t/rpl_bug12691.test mysql-test/suite/bugs/t/rpl_bug31582.test mysql-test/suite/bugs/t/rpl_bug31583.test mysql-test/suite/bugs/t/rpl_bug33029.test mysql-test/suite/bugs/t/rpl_bug38205.test renamed: mysql-test/suite/bugs/r/rpl_bug23533.result => mysql-test/suite/binlog/r/binlog_bug23533.result mysql-test/suite/bugs/r/rpl_bug36391.result => mysql-test/suite/binlog/r/binlog_bug36391.result mysql-test/suite/bugs/r/rpl_bug37426.result => mysql-test/suite/rpl/r/rpl_bug37426.result mysql-test/suite/bugs/t/rpl_bug23533.test => mysql-test/suite/binlog/t/binlog_bug23533.test mysql-test/suite/bugs/t/rpl_bug36391-master.opt => mysql-test/suite/binlog/t/binlog_bug36391-master.opt mysql-test/suite/bugs/t/rpl_bug36391.test => mysql-test/suite/binlog/t/binlog_bug36391.test mysql-test/suite/bugs/t/rpl_bug37426.test => mysql-test/suite/rpl/t/rpl_bug37426.test modified: mysql-test/collections/default.experimental mysql-test/suite/binlog/r/binlog_bug23533.result mysql-test/suite/binlog/r/binlog_bug36391.result mysql-test/suite/rpl/r/rpl_bug37426.result mysql-test/suite/binlog/t/binlog_bug23533.test mysql-test/suite/binlog/t/binlog_bug36391.test mysql-test/suite/rpl/t/rpl_bug37426.test === modified file 'mysql-test/collections/default.experimental' --- a/mysql-test/collections/default.experimental 2011-04-13 11:21:12 +0000 +++ b/mysql-test/collections/default.experimental 2011-04-13 21:03:10 +0000 @@ -2,6 +2,8 @@ # in alphabetical order. This also helps with merge conflict resolution. binlog.binlog_multi_engine # joro : NDB tests marked as experimental as agreed with bochklin +binlog.binlog_bug23533 # WL#5867: skozlov: test case moved from unused bugs suite +binlog.binlog_bug36391 # WL#5867: skozlov: test case moved from unused bugs suite funcs_1.charset_collation_1 # depends on compile-time decisions @@ -22,6 +24,7 @@ rpl.rpl_row_sp011 @solaris rpl.rpl_delayed_slave # BUG#57514 rpl_delayed_slave fails sporadically in pb rpl.rpl_seconds_behind_master # BUG#58053 2010-11-24 luis fails sporadically on pb2 rpl.rpl_show_slave_running # BUG#12346048 2011-04-11 sven fails sporadically on pb2 +rpl.rpl_bug37426 # WL#5867: skozlov: test case moved from unused bugs suite sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun sys_vars.plugin_dir_basic # Bug#52223 2010-11-24 alik Test "plugin_dir_basic" does not support RPM build (test) directory structure === renamed file 'mysql-test/suite/bugs/r/rpl_bug23533.result' => 'mysql-test/suite/binlog/r/binlog_bug23533.result' --- a/mysql-test/suite/bugs/r/rpl_bug23533.result 2008-02-28 21:50:15 +0000 +++ b/mysql-test/suite/binlog/r/binlog_bug23533.result 2011-04-13 20:18:08 +0000 @@ -1,23 +1,19 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS t1,t2; SET AUTOCOMMIT=0; -SET GLOBAL max_binlog_cache_size=4096; -SHOW VARIABLES LIKE 'max_binlog_cache_size'; -Variable_name Value -max_binlog_cache_size 4096 CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB; SELECT COUNT(*) FROM t1; COUNT(*) 1000 +SHOW VARIABLES LIKE 'max_binlog_cache_size'; +Variable_name Value +max_binlog_cache_size 4294963200 +SET @saved_max_binlog_cache_size=@@max_binlog_cache_size; +SET GLOBAL max_binlog_cache_size=4096; START TRANSACTION; CREATE TABLE t2 SELECT * FROM t1; -ERROR HY000: Writing one row to the row-based binary log failed +ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again COMMIT; SHOW TABLES LIKE 't%'; Tables_in_test (t%) t1 +SET GLOBAL max_binlog_cache_size=@saved_max_binlog_cache_size; +DROP TABLE t1; === renamed file 'mysql-test/suite/bugs/r/rpl_bug36391.result' => 'mysql-test/suite/binlog/r/binlog_bug36391.result' --- a/mysql-test/suite/bugs/r/rpl_bug36391.result 2010-05-24 13:54:08 +0000 +++ b/mysql-test/suite/binlog/r/binlog_bug36391.result 2011-04-13 20:18:08 +0000 @@ -1,18 +1,10 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -drop table if exists t1; -Warnings: -Note 1051 Unknown table 't1' -create table t1(id int); -show tables; +CREATE TABLE t1(id INT); +SHOW TABLES; Tables_in_test t1 -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 # -flush logs; -drop table t1; +FLUSH LOGS; +DROP TABLE t1; +SHOW TABLES; +Tables_in_test +t1 +DROP TABLE t1; === renamed file 'mysql-test/suite/bugs/t/rpl_bug23533.test' => 'mysql-test/suite/binlog/t/binlog_bug23533.test' --- a/mysql-test/suite/bugs/t/rpl_bug23533.test 2010-12-19 17:07:28 +0000 +++ b/mysql-test/suite/binlog/t/binlog_bug23533.test 2011-04-13 20:18:08 +0000 @@ -4,15 +4,13 @@ ############################################################# --source include/have_innodb.inc +--source include/have_log_bin.inc --source include/have_binlog_format_row.inc ---source include/master-slave.inc SET AUTOCOMMIT=0; -SET GLOBAL max_binlog_cache_size=4096; -SHOW VARIABLES LIKE 'max_binlog_cache_size'; +# Create 1st table CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB; - --disable_query_log let $i= 1000; while ($i) @@ -21,16 +19,20 @@ while ($i) dec $i; } --enable_query_log - SELECT COUNT(*) FROM t1; +# Set small value for max_binlog_cache_size +SHOW VARIABLES LIKE 'max_binlog_cache_size'; +SET @saved_max_binlog_cache_size=@@max_binlog_cache_size; +SET GLOBAL max_binlog_cache_size=4096; + # Copied data from t1 into t2 large than max_binlog_cache_size START TRANSACTION; ---error 1534 +--error 1197 CREATE TABLE t2 SELECT * FROM t1; COMMIT; SHOW TABLES LIKE 't%'; - # 5.1 End of Test ---source include/rpl_end.inc +SET GLOBAL max_binlog_cache_size=@saved_max_binlog_cache_size; +DROP TABLE t1; === renamed file 'mysql-test/suite/bugs/t/rpl_bug36391-master.opt' => 'mysql-test/suite/binlog/t/binlog_bug36391-master.opt' === renamed file 'mysql-test/suite/bugs/t/rpl_bug36391.test' => 'mysql-test/suite/binlog/t/binlog_bug36391.test' --- a/mysql-test/suite/bugs/t/rpl_bug36391.test 2010-12-19 17:07:28 +0000 +++ b/mysql-test/suite/binlog/t/binlog_bug36391.test 2011-04-13 20:18:08 +0000 @@ -13,17 +13,18 @@ # # ---source include/master-slave.inc +--source include/have_log_bin.inc +--source include/have_binlog_format_mixed.inc -create table t1(id int); +CREATE TABLE t1(id INT); +let $binlog= query_get_value(SHOW MASTER STATUS, File, 1); +let $binlog_path= `SELECT CONCAT(@@DATADIR, '$binlog')`; +SHOW TABLES; +FLUSH LOGS; +DROP TABLE t1; -show tables; +--exec $MYSQL_BINLOG $binlog_path | $MYSQL test +SHOW TABLES; ---source include/show_master_status.inc - -flush logs; - ---exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test - -drop table t1; ---source include/rpl_end.inc +# Clean up +DROP TABLE t1; === removed directory 'mysql-test/suite/bugs' === removed file 'mysql-test/suite/bugs/combinations' --- a/mysql-test/suite/bugs/combinations 2008-09-05 13:31:09 +0000 +++ b/mysql-test/suite/bugs/combinations 1970-01-01 00:00:00 +0000 @@ -1,8 +0,0 @@ -[row] -binlog-format=row - -[stmt] -binlog-format=statement - -[mix] -binlog-format=mixed === removed directory 'mysql-test/suite/bugs/data' === removed file 'mysql-test/suite/bugs/data/rpl_bug12691.dat' --- a/mysql-test/suite/bugs/data/rpl_bug12691.dat 2008-01-31 13:23:27 +0000 +++ b/mysql-test/suite/bugs/data/rpl_bug12691.dat 1970-01-01 00:00:00 +0000 @@ -1,3 +0,0 @@ -a -b -c === removed directory 'mysql-test/suite/bugs/r' === removed file 'mysql-test/suite/bugs/r/bug57108.result' --- a/mysql-test/suite/bugs/r/bug57108.result 2010-11-04 10:00:59 +0000 +++ b/mysql-test/suite/bugs/r/bug57108.result 1970-01-01 00:00:00 +0000 @@ -1,5 +0,0 @@ -INSTALL PLUGIN example SONAME 'ha_example.so'; -SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile; -connect_timeout 4711 -local_infile 1 -UNINSTALL PLUGIN example; === removed file 'mysql-test/suite/bugs/r/rpl_bug12691.result' --- a/mysql-test/suite/bugs/r/rpl_bug12691.result 2010-05-24 13:54:08 +0000 +++ b/mysql-test/suite/bugs/r/rpl_bug12691.result 1970-01-01 00:00:00 +0000 @@ -1,33 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; - -**** On Master **** -CREATE TABLE t1 (b CHAR(10)); - -**** On Slave **** -STOP SLAVE; - -**** On Master **** -LOAD DATA INFILE FILENAME -SELECT COUNT(*) FROM t1; -COUNT(*) -3 -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (b CHAR(10)) -master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`b`) ;file_id=# - -**** On Slave **** -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; -SELECT COUNT(*) FROM t1; -COUNT(*) -0 - -**** On Master **** -DROP TABLE t1; === removed file 'mysql-test/suite/bugs/r/rpl_bug31582.result' --- a/mysql-test/suite/bugs/r/rpl_bug31582.result 2007-12-05 19:49:50 +0000 +++ b/mysql-test/suite/bugs/r/rpl_bug31582.result 1970-01-01 00:00:00 +0000 @@ -1,16 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=MyISAM; -INSERT INTO t1 VALUES ('a'); -UPDATE t1 SET a = 'MyISAM'; -SELECT * FROM t1 ORDER BY a; -a -MyISAM -SELECT * FROM t1 ORDER BY a; -a -MyISAM -DROP TABLE t1; === removed file 'mysql-test/suite/bugs/r/rpl_bug31583.result' --- a/mysql-test/suite/bugs/r/rpl_bug31583.result 2008-02-18 14:48:17 +0000 +++ b/mysql-test/suite/bugs/r/rpl_bug31583.result 1970-01-01 00:00:00 +0000 @@ -1,16 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE t1 ( a INT, b INT DEFAULT -3 ); -INSERT INTO t1 VALUES (1, DEFAULT); -UPDATE t1 SET a = 3; -SELECT * FROM t1 ORDER BY a; -a b -3 -3 -SELECT * FROM t1 ORDER BY a; -a b -3 -3 -DROP TABLE t1; === removed file 'mysql-test/suite/bugs/r/rpl_bug33029.result' --- a/mysql-test/suite/bugs/r/rpl_bug33029.result 2008-06-19 18:47:59 +0000 +++ b/mysql-test/suite/bugs/r/rpl_bug33029.result 1970-01-01 00:00:00 +0000 @@ -1,15 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table `t1` (`id` int not null auto_increment primary key); -create trigger `trg` before insert on `t1` for each row begin end; -set @@global.debug="+d,simulate_bug33029"; -stop slave; -start slave; -insert into `t1` values (); -select * from t1; -id -1 === removed file 'mysql-test/suite/bugs/r/rpl_bug38205.result' --- a/mysql-test/suite/bugs/r/rpl_bug38205.result 2009-04-09 13:05:41 +0000 +++ b/mysql-test/suite/bugs/r/rpl_bug38205.result 1970-01-01 00:00:00 +0000 @@ -1,56 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t1i(n int primary key) engine=innodb; -create table t2m(n int primary key) engine=myisam; -begin; -insert into t1i values (1); -insert into t1i values (2); -insert into t1i values (3); -commit; -begin; -insert into t1i values (5); -begin; -insert into t1i values (4); -insert into t2m values (1); -update t1i set n = 5 where n = 4; -commit; -zero -0 -*** kill sql thread *** -rollback; -*** sql thread is *not* running: No *** -*** the prove: the killed slave has not finished the current transaction *** -three -3 -one -1 -zero -0 -delete from t2m; -start slave sql_thread; -delete from t1i; -delete from t2m; -begin; -insert into t1i values (5); -begin; -insert into t1i values (4); -update t1i set n = 5 where n = 4; -commit; -zero -0 -stop slave sql_thread; -rollback; -*** sql thread is *not* running: No *** -*** the prove: the stopped slave has rolled back the current transaction *** -zero -0 -zero -0 -one -1 -start slave sql_thread; -drop table t1i, t2m; === removed directory 'mysql-test/suite/bugs/t' === removed file 'mysql-test/suite/bugs/t/bug57108-master.opt' --- a/mysql-test/suite/bugs/t/bug57108-master.opt 2010-11-04 10:00:59 +0000 +++ b/mysql-test/suite/bugs/t/bug57108-master.opt 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ ---defaults-file=std_data/bug57108.cnf -$EXAMPLE_PLUGIN_OPT === removed file 'mysql-test/suite/bugs/t/bug57108.test' --- a/mysql-test/suite/bugs/t/bug57108.test 2011-01-11 13:27:03 +0000 +++ b/mysql-test/suite/bugs/t/bug57108.test 1970-01-01 00:00:00 +0000 @@ -1,12 +0,0 @@ ---source include/not_windows_embedded.inc ---source include/have_example_plugin.inc - -# Test that we can install a plugin despite the fact that we have -# switched directory after starting the server and am using a relative -# --defaults-file. ---replace_regex /\.dll/.so/ -eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN'; - ---query_vertical SELECT @@global.connect_timeout AS connect_timeout, @@global.local_infile AS local_infile - -UNINSTALL PLUGIN example; === removed file 'mysql-test/suite/bugs/t/rpl_bug12691.test' --- a/mysql-test/suite/bugs/t/rpl_bug12691.test 2010-12-19 17:15:12 +0000 +++ b/mysql-test/suite/bugs/t/rpl_bug12691.test 1970-01-01 00:00:00 +0000 @@ -1,48 +0,0 @@ -# Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER - ---source include/master-slave.inc ---source include/have_binlog_format_mixed_or_statement.inc - ---echo ---echo **** On Master **** -CREATE TABLE t1 (b CHAR(10)); ---echo ---echo **** On Slave **** ---sync_slave_with_master -STOP SLAVE; ---source include/wait_for_slave_to_stop.inc - ---connection master - ---echo ---echo **** On Master **** ---exec cp $MYSQL_TEST_DIR/suite/bugs/data/rpl_bug12691.dat $MYSQLTEST_VARDIR/tmp/ ---echo LOAD DATA INFILE FILENAME ---disable_query_log ---eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ---enable_query_log ---remove_file $MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat - -SELECT COUNT(*) FROM t1; - -source include/show_binlog_events.inc; - ---save_master_pos - ---connection slave ---echo ---echo **** On Slave **** -SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; -START SLAVE; ---source include/wait_for_slave_to_start.inc ---sync_with_master - -SELECT COUNT(*) FROM t1; - -# Clean up ---connection master ---echo ---echo **** On Master **** -DROP TABLE t1; - ---source include/rpl_end.inc === removed file 'mysql-test/suite/bugs/t/rpl_bug31582.test' --- a/mysql-test/suite/bugs/t/rpl_bug31582.test 2010-12-19 17:07:28 +0000 +++ b/mysql-test/suite/bugs/t/rpl_bug31582.test 1970-01-01 00:00:00 +0000 @@ -1,25 +0,0 @@ - -# BUG#31582: 5.1-telco-6.1 -> 5.1.22. Slave crashes when reading -# UPDATE for VARCHAR - -# This is a problem for any update statement replicating from an old -# server to a new server. The bug consisted of a new slave trying to -# read two column bitmaps, but there is only one available in the old -# format. - -# This test case should be executed replicating from an old server to -# a new server, so make sure you have one handy. - -source include/master-slave.inc; - -CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) ENGINE=MyISAM; -INSERT INTO t1 VALUES ('a'); -UPDATE t1 SET a = 'MyISAM'; -SELECT * FROM t1 ORDER BY a; -sync_slave_with_master; -SELECT * FROM t1 ORDER BY a; - -connection master; -DROP TABLE t1; - ---source include/rpl_end.inc === removed file 'mysql-test/suite/bugs/t/rpl_bug31583.test' --- a/mysql-test/suite/bugs/t/rpl_bug31583.test 2010-12-19 17:07:28 +0000 +++ b/mysql-test/suite/bugs/t/rpl_bug31583.test 1970-01-01 00:00:00 +0000 @@ -1,25 +0,0 @@ -# -# BUG#31583: 5.1-telco-6.1 -> 5.1.22. Slave returns Error in unknown event - -# This is a problem for any update statement replicating from an old -# server to a new server. The bug consisted of a new slave trying to -# read two column bitmaps, but there is only one available in the old -# format. - -# This test case should be executed replicating from an old server to -# a new server, so make sure you have one handy. - -source include/master-slave.inc; - -CREATE TABLE t1 ( a INT, b INT DEFAULT -3 ); - -INSERT INTO t1 VALUES (1, DEFAULT); -UPDATE t1 SET a = 3; -SELECT * FROM t1 ORDER BY a; -sync_slave_with_master; -SELECT * FROM t1 ORDER BY a; - -connection master; -DROP TABLE t1; - ---source include/rpl_end.inc === removed file 'mysql-test/suite/bugs/t/rpl_bug33029.test' --- a/mysql-test/suite/bugs/t/rpl_bug33029.test 2010-12-19 17:07:28 +0000 +++ b/mysql-test/suite/bugs/t/rpl_bug33029.test 1970-01-01 00:00:00 +0000 @@ -1,26 +0,0 @@ -# -# Bug #36443 Server crashes when executing insert when insert trigger on table -# -# Emulating the former bug#33029 situation to see that there is no crash anymore. -# - - -source include/master-slave.inc; - -create table `t1` (`id` int not null auto_increment primary key); -create trigger `trg` before insert on `t1` for each row begin end; - -sync_slave_with_master; -set @@global.debug="+d,simulate_bug33029"; - -stop slave; -start slave; - -connection master; - -insert into `t1` values (); - -sync_slave_with_master; -select * from t1; - ---source include/rpl_end.inc === removed file 'mysql-test/suite/bugs/t/rpl_bug38205.test' --- a/mysql-test/suite/bugs/t/rpl_bug38205.test 2010-12-19 17:07:28 +0000 +++ b/mysql-test/suite/bugs/t/rpl_bug38205.test 1970-01-01 00:00:00 +0000 @@ -1,166 +0,0 @@ -# -# Bug #38205 Row-based Replication (RBR) causes inconsistencies: HA_ERR_FOUND_DUPP_KEY -# Bug#319 if while a non-transactional slave is replicating a transaction possible problem -# -# Verifying the fact that STOP SLAVE in the middle of a group execution waits -# for the end of the group before the slave sql thread will stop. -# The patch refines STOP SLAVE to not interrupt a transaction or other type of -# the replication events group (the part I). -# Killing the sql thread continues to provide a "hard" stop (the part II). -# -# Non-deterministic tests -# - -source include/master-slave.inc; -source include/have_innodb.inc; - - -# -# Part II, killed sql slave leaves instantly -# - -# A. multi-statement transaction as the replication group - -connection master; - -create table t1i(n int primary key) engine=innodb; -create table t2m(n int primary key) engine=myisam; - -sync_slave_with_master; - -connection master; - -begin; -insert into t1i values (1); -insert into t1i values (2); -insert into t1i values (3); -commit; - -sync_slave_with_master; - -# -# todo: first challenge is to find out the SQL thread id -# the following is not fully reliable -# - -let $id=`SELECT id from information_schema.processlist where user like 'system user' and state like '%Has read all relay log%' or user like 'system user' and state like '%Reading event from the relay log%'`; -connection slave; -begin; -insert into t1i values (5); - -connection master; -let $pos0_master= query_get_value(SHOW MASTER STATUS, Position, 1); -begin; -insert into t1i values (4); -insert into t2m values (1); # non-ta update -update t1i set n = 5 where n = 4; # to block at. can't be played with killed -commit; -let $pos1_master= query_get_value(SHOW MASTER STATUS, Position, 1); - -connection slave; -# slave sql thread must be locked out by the conn `slave' explicit lock -let $pos0_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); ---disable_query_log -eval select $pos0_master - $pos0_slave as zero; ---enable_query_log - -connection slave1; - -let $count= 1; -let $table= t2m; -source include/wait_until_rows_count.inc; -# -# todo: may fail as said above -# ---echo *** kill sql thread *** ---disable_query_log -eval kill connection $id; ---enable_query_log - -connection slave; -rollback; # release the sql thread - -connection slave1; - -source include/wait_for_slave_sql_to_stop.inc; -let $sql_status= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1); ---echo *** sql thread is *not* running: $sql_status *** -let $pos1_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); - -connection slave; ---echo *** the prove: the killed slave has not finished the current transaction *** - ---disable_query_log -select count(*) as three from t1i; -eval select $pos1_master > $pos1_slave as one; -eval select $pos1_slave - $pos0_slave as zero; ---enable_query_log - -delete from t2m; # remove the row to be able to replay -start slave sql_thread; - -# -# Part I: B The homogenous transaction remains interuptable in between -# - -connection master; -delete from t1i; -delete from t2m; - -sync_slave_with_master; -begin; -insert into t1i values (5); - -connection master; -let $pos0_master= query_get_value(SHOW MASTER STATUS, Position, 1); -begin; -insert into t1i values (4); -update t1i set n = 5 where n = 4; # to block at. not to be played -commit; -let $pos1_master= query_get_value(SHOW MASTER STATUS, Position, 1); - - -connection slave1; -# slave sql can't advance as must be locked by the conn `slave' trans -let $pos0_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); ---disable_query_log -eval select $pos0_master - $pos0_slave as zero; ---enable_query_log - -# -# the replicated trans is blocked by the slave's local. -# However, it's not easy to catch the exact moment when it happens. -# The test issues sleep which makes the test either non-deterministic or -# wasting too much time. -# ---sleep 3 - -send stop slave sql_thread; - -connection slave; -rollback; # release the sql thread - -connection slave1; -reap; -source include/wait_for_slave_sql_to_stop.inc; -let $sql_status= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1); ---echo *** sql thread is *not* running: $sql_status *** - -let $pos1_slave= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); - ---echo *** the prove: the stopped slave has rolled back the current transaction *** - ---disable_query_log -select count(*) as zero from t1i; -eval select $pos0_master - $pos0_slave as zero; -eval select $pos1_master > $pos0_slave as one; ---enable_query_log - -start slave sql_thread; - -# clean-up - -connection master; -drop table t1i, t2m; - ---source include/rpl_end.inc === renamed file 'mysql-test/suite/bugs/r/rpl_bug37426.result' => 'mysql-test/suite/rpl/r/rpl_bug37426.result' --- a/mysql-test/suite/bugs/r/rpl_bug37426.result 2008-06-30 20:11:18 +0000 +++ b/mysql-test/suite/rpl/r/rpl_bug37426.result 2011-04-13 20:18:08 +0000 @@ -1,13 +1,6 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -CREATE TABLE char128_utf8 ( -i1 INT NOT NULL, -c CHAR(128) CHARACTER SET utf8 NOT NULL, -i2 INT NOT NULL); +include/master-slave.inc +[connection master] +CREATE TABLE char128_utf8 (i1 INT NOT NULL, c CHAR(128) CHARACTER SET utf8 NOT NULL, i2 INT NOT NULL); INSERT INTO char128_utf8 VALUES ( 1, "123", 1 ); SELECT * FROM char128_utf8; i1 c i2 @@ -15,3 +8,5 @@ i1 c i2 SELECT * FROM char128_utf8; i1 c i2 1 123 1 +DROP TABLE char128_utf8; +include/rpl_end.inc === renamed file 'mysql-test/suite/bugs/t/rpl_bug37426.test' => 'mysql-test/suite/rpl/t/rpl_bug37426.test' --- a/mysql-test/suite/bugs/t/rpl_bug37426.test 2010-12-19 17:07:28 +0000 +++ b/mysql-test/suite/rpl/t/rpl_bug37426.test 2011-04-13 20:18:08 +0000 @@ -7,15 +7,16 @@ source include/master-slave.inc; source include/have_binlog_format_row.inc; connection master; -CREATE TABLE char128_utf8 ( - i1 INT NOT NULL, - c CHAR(128) CHARACTER SET utf8 NOT NULL, - i2 INT NOT NULL); - +CREATE TABLE char128_utf8 (i1 INT NOT NULL, c CHAR(128) CHARACTER SET utf8 NOT NULL, i2 INT NOT NULL); INSERT INTO char128_utf8 VALUES ( 1, "123", 1 ); SELECT * FROM char128_utf8; sync_slave_with_master; SELECT * FROM char128_utf8; + +# Clean up +connection master; +DROP TABLE char128_utf8; +sync_slave_with_master; --source include/rpl_end.inc --===============0997151033== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/serge.kozlov@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: serge.kozlov@stripped # target_branch: file:///home/ksm/oracle/repo/bugs_suite/mysql-trunk/ # testament_sha1: a79e8477fed166888940586f0a77f738eb9ab061 # timestamp: 2011-04-14 01:04:10 +0400 # source_branch: file:///home/ksm/oracle/repo/bugs_suite/mysql-5.5/ # base_revision_id: davi.arnaut@stripped\ # 42lqxp32gvvjry5c # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWTinEOsACoR/gAAwggBc5/// f+//qv////RgEP9499G71Z7rJjQGj0OjRoHQXd9OeYtFKj00oAAUKAKpBpJMTRiNNAADR6mgDQAA AAAAZVBoGgAMgAADTTJpkAAAAAZAJNFDU9TTeqbSep6gAABoDQAAAASIRJkh6m1TKPaoye1QA9Jk PJPSBsU8poaDTagEUhAIACaYJoGoaMpAAyaaBoek0MQSSAQGiYQRlNTYhpJpkNANqaNB6jIaGTbP R4v4Hcw3Fl8GG36c4v6epTowzj4vxItAtZda0/vkFHpIXq3yOzZsNj1W9/MizjOJazTLcUK44iOG DHE8WHVhwYVxFPhZDbsyj+oXFnC4c72MhGMwQ0QZxxzc0pbKgbotMywwdr6zYzVe+bQGGbDBqIvj jjNNYrNNjbF7CQkwzW23bEMJO1hQthO4NQGdWHY/los9o79/qazDVzEuHUlINEwJQCQQAiEIgS3y JCwoXjytnys5QiUIo5S+id7O/3jdkCIu0YKQwRJ0bblxdLNnYipnLB6eVWztSOmDKl2EvCAxCrQq MZeVZb0tquwVEutNLKghUWg6xUZk3c465k12grGb1DHaBunFXova7v7F1GZ1HeS0cHwyLT4mq+s/ WfZ9FgZjCtV/efWMMKYngrv1ZcFzcZEkiVATIh2UJQEmDIk20GtICSQL0cEDEXCK2UehbixyolUB 98RXTBDEPmw+8VxxPvh5pnOaeeoi6btuUgAsUAiYFVZBKYigFQA+MVzwyug2q7rMIbhBlGUgC5w5 zp6Ye5KD5muV/3BC8hyzJxj/DwKsS5fHVb6rhy8CO+OIx7+SZqpVrblyh0MNzPvGR43wGQC4HfBD 67Kjzd2ej+voPU8R+o1lYDmfgwplnuS9gj3rhefOEA+VaGKyk80rYZhXntmMEsPBxD5BhqKKjKHt wQ9DWVlSCZnZm3QQSLytLXNrMZBtEcHNprXncIeXJAEREREnhx9v2iK8LDeSUsUsFDW1m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