diff options
Diffstat (limited to 'mysql-test/extra/rpl_tests')
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_blackhole.test | 2 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_charset.test | 18 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_conflicts.test | 10 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_ddl.test | 86 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_extra_col_slave.test | 1 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_innodb.test | 10 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_loaddata.test | 2 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_row_basic.test | 15 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_row_sp007.test | 9 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_row_tabledefs.test | 12 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_start_stop_slave.test | 10 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_stop_slave.test | 8 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_test_framework.inc | 3 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_truncate_helper.test | 4 |
14 files changed, 9 insertions, 181 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_blackhole.test b/mysql-test/extra/rpl_tests/rpl_blackhole.test index 1a0eeb3cf15..a37d24b4cd6 100644 --- a/mysql-test/extra/rpl_tests/rpl_blackhole.test +++ b/mysql-test/extra/rpl_tests/rpl_blackhole.test @@ -14,11 +14,9 @@ connection slave; let $before = query_get_value("SHOW MASTER STATUS", Position, 1); ---echo [on master] connection master; eval $statement; ---echo [on slave] sync_slave_with_master; --echo # Expect 0 SELECT COUNT(*) FROM t1; diff --git a/mysql-test/extra/rpl_tests/rpl_charset.test b/mysql-test/extra/rpl_tests/rpl_charset.test index 5009dff8d73..37ca2e28eec 100644 --- a/mysql-test/extra/rpl_tests/rpl_charset.test +++ b/mysql-test/extra/rpl_tests/rpl_charset.test @@ -7,15 +7,9 @@ set timestamp=1000000000; create database mysqltest2 character set latin2; set @@character_set_server=latin5; create database mysqltest3; ---disable_query_log -select "--- --master--" as ""; ---enable_query_log show create database mysqltest2; show create database mysqltest3; sync_slave_with_master; ---disable_query_log -select "--- --slave--" as ""; ---enable_query_log show create database mysqltest2; show create database mysqltest3; @@ -23,14 +17,8 @@ connection master; set @@collation_server=armscii8_bin; drop database mysqltest3; create database mysqltest3; ---disable_query_log -select "--- --master--" as ""; ---enable_query_log show create database mysqltest3; sync_slave_with_master; ---disable_query_log -select "--- --slave--" as ""; ---enable_query_log show create database mysqltest3; connection master; @@ -45,10 +33,8 @@ insert into t1 (b) values(@@character_set_client); # collation_client does not exist insert into t1 (b) values(@@character_set_connection); insert into t1 (b) values(@@collation_connection); ---echo --- --master-- select * from t1 order by a; sync_slave_with_master; ---echo --- --slave-- select * from mysqltest2.t1 order by a; connection master; @@ -59,10 +45,8 @@ insert into t1 (b) values(LEAST("Müller","Muffler")); set collation_connection=latin1_german2_ci; insert into t1 (b) values(@@collation_connection); insert into t1 (b) values(LEAST("Müller","Muffler")); ---echo --- --master-- select * from t1 order by a; sync_slave_with_master; ---echo --- --slave-- select * from mysqltest2.t1 order by a; # Presently charset info is not logged with LOAD DATA but it will @@ -81,10 +65,8 @@ connection master; set @a= _cp850 'Müller' collate cp850_general_ci; truncate table t1; insert into t1 (b) values(collation(@a)); ---echo --- --master-- select * from t1 order by a; sync_slave_with_master; ---echo --- --slave-- select * from mysqltest2.t1 order by a; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_conflicts.test b/mysql-test/extra/rpl_tests/rpl_conflicts.test index b9bff3993e6..a8c796af50c 100644 --- a/mysql-test/extra/rpl_tests/rpl_conflicts.test +++ b/mysql-test/extra/rpl_tests/rpl_conflicts.test @@ -57,10 +57,8 @@ --echo ==== Initialize ==== ---echo [on master] connection master; CREATE TABLE t1(a INT PRIMARY KEY); ---echo [on slave] sync_slave_with_master; @@ -71,14 +69,12 @@ sync_slave_with_master; INSERT INTO t1 VALUES (1); --echo ---- Insert rows on master ---- ---echo [on master] connection master; # Insert the same row on master INSERT INTO t1 VALUES (1); save_master_pos; SELECT * FROM t1; ---echo [on slave] connection slave; # If we are statement-logging or if slave_exec_mode=STRICT, we now @@ -117,23 +113,19 @@ SELECT * FROM t1; --echo ==== Test: SQL thread sees 'DELETE' of non-existing row ==== --echo ---- On master, insert two rows, the second with binlogging off ---- ---echo [on master] connection master; DELETE FROM t1; INSERT INTO t1 VALUES (1); ---echo [on slave] sync_slave_with_master; DELETE FROM t1 WHERE a = 1; --echo ---- On master, remove the row that does not exist on slave ---- ---echo [on master] connection master; DELETE FROM t1 WHERE a = 1; SELECT * FROM t1; save_master_pos; ---echo [on slave] connection slave; # If we are row-logging and slave_exec_mode is STRICT, we now expect @@ -172,9 +164,7 @@ SELECT * FROM t1; --echo ==== Clean up ==== ---echo [on master] connection master; DROP TABLE t1; ---echo [on slave] --sync_slave_with_master diff --git a/mysql-test/extra/rpl_tests/rpl_ddl.test b/mysql-test/extra/rpl_tests/rpl_ddl.test index 21778a11df5..e466a08a541 100644 --- a/mysql-test/extra/rpl_tests/rpl_ddl.test +++ b/mysql-test/extra/rpl_tests/rpl_ddl.test @@ -133,8 +133,6 @@ set local sql_mode=''; # The sync_slave_with_master is needed to make the xids deterministic. sync_slave_with_master; ---echo ---echo -------- switch to master ------- connection master; SET AUTOCOMMIT = 1; # @@ -186,13 +184,9 @@ eval CREATE TEMPORARY TABLE mysqltest1.t23 (f1 BIGINT) ENGINE=$temp_engine_type; SET AUTOCOMMIT = 0; use mysqltest1; sync_slave_with_master; ---echo ---echo -------- switch to slave -------- connection slave; SET AUTOCOMMIT = 1; use mysqltest1; ---echo ---echo -------- switch to master ------- connection master; @@ -260,12 +254,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW TABLES LIKE 't2'; ---echo ---echo -------- switch to slave -------- connection slave; SHOW TABLES LIKE 't2'; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= DROP TEMPORARY TABLE mysqltest1.t23; @@ -273,12 +263,8 @@ let $my_master_commit= false; let $my_slave_commit= false; --source include/rpl_stmt_seq.inc SHOW TABLES LIKE 't23'; ---echo ---echo -------- switch to slave -------- connection slave; SHOW TABLES LIKE 't23'; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= RENAME TABLE mysqltest1.t3 to mysqltest1.t20; @@ -286,12 +272,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW TABLES LIKE 't20'; ---echo ---echo -------- switch to slave -------- connection slave; SHOW TABLES LIKE 't20'; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= ALTER TABLE mysqltest1.t4 ADD column f2 BIGINT; @@ -299,12 +281,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc describe mysqltest1.t4; ---echo ---echo -------- switch to slave -------- connection slave; describe mysqltest1.t4; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= CREATE TABLE mysqltest1.t21 (f1 BIGINT) ENGINE= $engine_type; @@ -326,12 +304,8 @@ let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SELECT * FROM mysqltest1.t7; sync_slave_with_master; ---echo ---echo -------- switch to slave -------- connection slave; SELECT * FROM mysqltest1.t7; ---echo ---echo -------- switch to master ------- connection master; ############################################################### @@ -383,12 +357,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW INDEX FROM mysqltest1.t6; ---echo ---echo -------- switch to slave -------- connection slave; SHOW INDEX FROM mysqltest1.t6; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= CREATE INDEX my_idx5 ON mysqltest1.t5(f1); @@ -396,12 +366,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW INDEX FROM mysqltest1.t5; ---echo ---echo -------- switch to slave -------- connection slave; SHOW INDEX FROM mysqltest1.t5; ---echo ---echo -------- switch to master ------- connection master; ############################################################### @@ -413,12 +379,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW DATABASES LIKE "mysqltest2"; ---echo ---echo -------- switch to slave -------- connection slave; SHOW DATABASES LIKE "mysqltest2"; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= CREATE DATABASE mysqltest3; @@ -426,12 +388,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW DATABASES LIKE "mysqltest3"; ---echo ---echo -------- switch to slave -------- connection slave; SHOW DATABASES LIKE "mysqltest3"; ---echo ---echo -------- switch to master ------- connection master; # End of 4.1 tests @@ -446,13 +404,9 @@ let $my_slave_commit= true; --vertical_results --replace_column 5 # 6 # SHOW PROCEDURE STATUS LIKE 'p1'; ---echo ---echo -------- switch to slave -------- connection slave; --replace_column 5 # 6 # SHOW PROCEDURE STATUS LIKE 'p1'; ---echo ---echo -------- switch to master ------- connection master; --horizontal_results @@ -463,13 +417,9 @@ let $my_slave_commit= true; --vertical_results --replace_column 5 # 6 # SHOW PROCEDURE STATUS LIKE 'p1'; ---echo ---echo -------- switch to slave -------- connection slave; --replace_column 5 # 6 # SHOW PROCEDURE STATUS LIKE 'p1'; ---echo ---echo -------- switch to master ------- connection master; --horizontal_results @@ -479,12 +429,8 @@ let $my_slave_commit= true; --source include/rpl_stmt_seq.inc --vertical_results SHOW PROCEDURE STATUS LIKE 'p1'; ---echo ---echo -------- switch to slave -------- connection slave; SHOW PROCEDURE STATUS LIKE 'p1'; ---echo ---echo -------- switch to master ------- connection master; --horizontal_results @@ -496,12 +442,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW CREATE VIEW v1; ---echo ---echo -------- switch to slave -------- connection slave; SHOW CREATE VIEW v1; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= ALTER VIEW v1 AS select f1 from t1; @@ -509,12 +451,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW CREATE VIEW v1; ---echo ---echo -------- switch to slave -------- connection slave; SHOW CREATE VIEW v1; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= DROP VIEW IF EXISTS v1; @@ -523,13 +461,9 @@ let $my_slave_commit= true; --source include/rpl_stmt_seq.inc --error 1146 SHOW CREATE VIEW v1; ---echo ---echo -------- switch to slave -------- connection slave; --error 1146 SHOW CREATE VIEW v1; ---echo ---echo -------- switch to master ------- connection master; ############################################################### @@ -540,12 +474,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW TRIGGERS; ---echo ---echo -------- switch to slave -------- connection slave; SHOW TRIGGERS; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= DROP TRIGGER trg1; @@ -553,12 +483,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SHOW TRIGGERS; ---echo ---echo -------- switch to slave -------- connection slave; SHOW TRIGGERS; ---echo ---echo -------- switch to master ------- connection master; ############################################################### @@ -569,12 +495,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SELECT user FROM mysql.user WHERE user = 'user1'; ---echo ---echo -------- switch to slave -------- connection slave; SELECT user FROM mysql.user WHERE user = 'user1'; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= RENAME USER user1@localhost TO rename1@localhost; @@ -582,12 +504,8 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SELECT user FROM mysql.user WHERE user = 'rename1'; ---echo ---echo -------- switch to slave -------- connection slave; SELECT user FROM mysql.user WHERE user = 'rename1'; ---echo ---echo -------- switch to master ------- connection master; let $my_stmt= DROP USER rename1@localhost; @@ -595,8 +513,6 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SELECT user FROM mysql.user WHERE user = 'rename1'; ---echo ---echo -------- switch to slave -------- connection slave; SELECT user FROM mysql.user WHERE user = 'rename1'; @@ -604,8 +520,6 @@ SELECT user FROM mysql.user WHERE user = 'rename1'; # Cleanup ############################################################### use test; ---echo ---echo -------- switch to master ------- connection master; DROP TEMPORARY TABLE mysqltest1.t22; DROP DATABASE mysqltest1; diff --git a/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test index 47d75c0d0b2..a58fa85a72d 100644 --- a/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test @@ -23,7 +23,6 @@ call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot ### Should Stop Slave ### ############################################## ---echo *** On Slave *** sync_slave_with_master; STOP SLAVE; RESET SLAVE; diff --git a/mysql-test/extra/rpl_tests/rpl_innodb.test b/mysql-test/extra/rpl_tests/rpl_innodb.test index 6b3732439b2..2fb1a1c5c79 100644 --- a/mysql-test/extra/rpl_tests/rpl_innodb.test +++ b/mysql-test/extra/rpl_tests/rpl_innodb.test @@ -64,7 +64,6 @@ eval CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=$engine_type; SET AUTOCOMMIT = 0; sync_slave_with_master; ---echo -------- switch to slave -------- connection slave; # We want to verify that the following transactions are written to the @@ -79,7 +78,6 @@ connection slave; ALTER TABLE mysqltest1.t1 ENGINE = MyISAM; SHOW CREATE TABLE mysqltest1.t1; ---echo -------- switch to master -------- connection master; INSERT INTO mysqltest1.t1 SET f1= 1; DROP TEMPORARY TABLE mysqltest1.tmp; @@ -98,7 +96,6 @@ SHOW CREATE TABLE mysqltest1.tmp2; SELECT COUNT(*) FROM mysqltest1.t1; sync_slave_with_master; ---echo -------- switch to slave -------- connection slave; --error ER_NO_SUCH_TABLE SHOW CREATE TABLE mysqltest1.tmp; @@ -108,7 +105,6 @@ SHOW CREATE TABLE mysqltest1.tmp2; SELECT COUNT(*) FROM mysqltest1.t1; FLUSH LOGS; ---echo -------- switch to master -------- connection master; FLUSH LOGS; DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2; @@ -142,11 +138,9 @@ INSERT INTO t1 (b) VALUES (1),(2),(3); BEGIN; INSERT INTO t1(b) VALUES (4); ---echo -------- switch to master1 -------- connection master1; --send RENAME TABLE t1 TO t3, t2 TO t1; ---echo -------- switch to master -------- connection master; # Need to wait until RENAME is received let $wait_condition= @@ -157,23 +151,19 @@ let $wait_condition= COMMIT; ---echo -------- switch to master1 -------- connection master1; --reap ---echo -------- switch to master -------- connection master; SELECT * FROM t1; SELECT * FROM t3; sync_slave_with_master; ---echo -------- switch to slave -------- connection slave; SELECT * FROM t1; SELECT * FROM t3; ---echo -------- switch to master -------- connection master; DROP TABLE t1; DROP TABLE t3; diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index 67eb137bdf4..e1942dad239 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -197,7 +197,6 @@ DROP TABLE t1; -- eval LOAD DATA $lock_option LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1 -- echo ### create connection without default database --- echo ### connect (conn2,localhost,root,,*NO-ONE*); connect (conn2,localhost,root,,*NO-ONE*); -- connection conn2 -- echo ### assertion: works without stating the default database @@ -216,7 +215,6 @@ connect (conn2,localhost,root,,*NO-ONE*); -- let $table= $db1.t1 --source include/wait_until_rows_count.inc --- echo ### disconnect and switch back to master connection -- disconnect conn2 -- connection master diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test index da8787d22f2..f45c8824b10 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_basic.test +++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test @@ -216,7 +216,7 @@ if (`select char_length('$bit_field_special') > 0`) { connection master; eval CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = $type ; sync_slave_with_master; ---echo --- on slave: original values --- +--echo --- original values --- INSERT INTO t7 VALUES (1,3), (2,6), (3,9); SELECT * FROM t7 ORDER BY C1; @@ -226,13 +226,13 @@ SELECT * FROM t7 ORDER BY C1; set @@global.slave_exec_mode= 'IDEMPOTENT'; connection master; ---echo --- on master: new values inserted --- +--echo --- new values inserted --- INSERT INTO t7 VALUES (1,2), (2,4), (3,6); SELECT * FROM t7 ORDER BY C1; sync_slave_with_master; set @@global.slave_exec_mode= default; ---echo --- on slave: old values should be overwritten by replicated values --- +--echo --- old values should be overwritten by replicated values --- SELECT * FROM t7 ORDER BY C1; # @@ -240,7 +240,6 @@ SELECT * FROM t7 ORDER BY C1; # causing a conflict for a key that is not "last". # connection master; ---echo --- on master --- eval CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = $type ; # First we make sure that the constraints are correctly set. @@ -254,7 +253,6 @@ INSERT INTO t8 VALUES (11,22,99); SELECT * FROM t8 ORDER BY a; sync_slave_with_master; ---echo --- on slave --- SELECT * FROM t8 ORDER BY a; INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); SELECT * FROM t8 ORDER BY a; @@ -265,14 +263,12 @@ SELECT * FROM t8 ORDER BY a; set @@global.slave_exec_mode= 'IDEMPOTENT'; connection master; ---echo --- on master --- # We insert a row that will cause conflict on the primary key but not # on the other keys. INSERT INTO t8 VALUES (2,4,8); sync_slave_with_master; set @@global.slave_exec_mode= default; ---echo --- on slave --- SELECT * FROM t8 ORDER BY a; # BUG#31552: Replication breaks when deleting rows from out-of-sync @@ -280,7 +276,6 @@ SELECT * FROM t8 ORDER BY a; --echo **** Test for BUG#31552 **** ---echo **** On Master **** # Clean up t1 so that we can use it. connection master; DELETE FROM t1; @@ -289,10 +284,8 @@ sync_slave_with_master; # Just to get a clean binary log --source include/rpl_reset.inc ---echo **** On Master **** connection master; INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); ---echo **** On Master **** sync_slave_with_master; # since bug#31552/31609 idempotency is not default any longer. In order # the following test DELETE FROM t1 to pass the mode is switched @@ -313,14 +306,12 @@ query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2; # (regression test) --echo **** Test for BUG#37076 **** ---echo **** On Master **** connection master; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE); INSERT INTO t1 VALUES( '2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14'); ---echo **** On Slave **** sync_slave_with_master slave; SELECT * FROM t1; diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp007.test b/mysql-test/extra/rpl_tests/rpl_row_sp007.test index 492cd2d88f1..4a68dddfdc2 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_sp007.test +++ b/mysql-test/extra/rpl_tests/rpl_row_sp007.test @@ -22,25 +22,16 @@ BEGIN END| delimiter ;| -let $message=< ---- Master selects-- >; ---source include/show_msg.inc CALL test.p1(12); SELECT * FROM test.t1; - -let $message=< ---- Slave selects-- >; ---source include/show_msg.inc sync_slave_with_master; SELECT * FROM test.t1; -let $message=< ---- Master selects-- >; ---source include/show_msg.inc connection master; CALL test.p1(13); SELECT * FROM test.t1; -let $message=< ---- Slave selects-- >; ---source include/show_msg.inc sync_slave_with_master; SELECT * FROM test.t1; diff --git a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test index 8de2e6974b1..ddff3fa51f7 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test +++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test @@ -78,7 +78,6 @@ INSERT INTO t1_int VALUES (2, 4, 4711); INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar'); INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01'); ---echo **** On Master **** connection master; INSERT INTO t1_int VALUES (1,2); INSERT INTO t1_int VALUES (2,5); @@ -89,7 +88,6 @@ INSERT INTO t1_char VALUES (2,5); SELECT * FROM t1_int ORDER BY a; SELECT * FROM t1_bit ORDER BY a; SELECT * FROM t1_char ORDER BY a; ---echo **** On Slave **** sync_slave_with_master; set @@global.slave_exec_mode= default; @@ -97,7 +95,6 @@ SELECT a,b,x FROM t1_int ORDER BY a; SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; SELECT a,b,x FROM t1_char ORDER BY a; ---echo **** On Master **** connection master; UPDATE t1_int SET b=2*b WHERE a=2; UPDATE t1_char SET b=2*b WHERE a=2; @@ -105,7 +102,6 @@ UPDATE t1_bit SET b=2*b WHERE a=2; SELECT * FROM t1_int ORDER BY a; SELECT * FROM t1_bit ORDER BY a; SELECT * FROM t1_char ORDER BY a; ---echo **** On Slave **** sync_slave_with_master; SELECT a,b,x FROM t1_int ORDER BY a; SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a; @@ -132,11 +128,9 @@ INSERT INTO t9 VALUES (2); sync_slave_with_master; # Now slave is guaranteed to be running connection master; ---echo **** On Master **** INSERT INTO t2 VALUES (2,4); SELECT * FROM t2; sync_slave_with_master; ---echo **** On Slave **** SELECT * FROM t2; --source include/check_slave_is_running.inc @@ -200,7 +194,6 @@ SELECT * FROM t8 ORDER BY a; # update should not generate an error even though there is no default # for the extra column. ---echo **** On Master **** connection master; TRUNCATE t1_nodef; SET SQL_LOG_BIN=0; @@ -209,26 +202,21 @@ INSERT INTO t1_nodef VALUES (2,4); SET SQL_LOG_BIN=1; sync_slave_with_master; ---echo **** On Slave **** connection slave; INSERT INTO t1_nodef VALUES (1,2,3,4,5); INSERT INTO t1_nodef VALUES (2,4,6,8,10); ---echo **** On Master **** connection master; UPDATE t1_nodef SET b=2*b WHERE a=1; SELECT * FROM t1_nodef ORDER BY a; ---echo **** On Slave **** sync_slave_with_master; SELECT * FROM t1_nodef ORDER BY a; ---echo **** On Master **** connection master; DELETE FROM t1_nodef WHERE a=2; SELECT * FROM t1_nodef ORDER BY a; ---echo **** On Slave **** sync_slave_with_master; SELECT * FROM t1_nodef ORDER BY a; diff --git a/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test index 40bc7746ccf..32f33b2a31d 100644 --- a/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_start_stop_slave.test @@ -140,11 +140,11 @@ CREATE TABLE t1 (a INT ); sync_slave_with_master; --connection slave1 ---echo # Slave1: lock table for synchronization +--echo # lock table for synchronization LOCK TABLES t1 WRITE; --connection master ---echo # Master: insert into the table +--echo # insert into the table INSERT INTO t1 SELECT SLEEP(4); --connection slave @@ -155,11 +155,11 @@ let $wait_condition= AND INFO = "INSERT INTO t1 SELECT SLEEP(4)"; --source include/wait_condition.inc ---echo # Slave: send slave stop +--echo # send slave stop --send STOP SLAVE --connection slave1 ---echo # Slave1: wait for stop slave +--echo # wait for stop slave let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = "STOP SLAVE"; @@ -169,7 +169,7 @@ let $wait_condition= UNLOCK TABLES; --connection slave ---echo # Slave: wait for the slave to stop +--echo # wait for the slave to stop --reap --source include/wait_for_slave_to_stop.inc diff --git a/mysql-test/extra/rpl_tests/rpl_stop_slave.test b/mysql-test/extra/rpl_tests/rpl_stop_slave.test index 0f09faa0301..2ab59f56d7a 100644 --- a/mysql-test/extra/rpl_tests/rpl_stop_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_stop_slave.test @@ -15,8 +15,6 @@ if (!$tmp_table_stm) --die $tmp_table_stm is NULL } ---echo ---echo [ On Master ] connection master; BEGIN; DELETE FROM t1; @@ -25,8 +23,6 @@ INSERT INTO t1 VALUES (1); DROP TEMPORARY TABLE tt1; COMMIT; ---echo ---echo [ On Slave ] connection slave; # To check if slave SQL thread is applying INSERT statement @@ -37,16 +33,12 @@ source include/wait_show_condition.inc; send STOP SLAVE SQL_THREAD; ---echo ---echo [ On Slave1 ] connection slave1; --echo # To resume slave SQL thread SET DEBUG_SYNC= 'now SIGNAL signal.continue'; SET DEBUG_SYNC= 'now WAIT_FOR signal.continued'; SET DEBUG_SYNC= 'RESET'; ---echo ---echo [ On Slave ] connection slave; reap; source include/wait_for_slave_sql_to_stop.inc; diff --git a/mysql-test/extra/rpl_tests/rpl_test_framework.inc b/mysql-test/extra/rpl_tests/rpl_test_framework.inc index fb42d2efb9a..9613d31bf1c 100644 --- a/mysql-test/extra/rpl_tests/rpl_test_framework.inc +++ b/mysql-test/extra/rpl_tests/rpl_test_framework.inc @@ -62,8 +62,7 @@ while ($masters) --let $masters= `SELECT SUBSTRING('$masters', LENGTH('$master_i') + 2)` # Connect to master and execute statement - --let $rpl_connection_name= server_$master_i - --source include/rpl_connection.inc + connection server_$master_i; DELETE FROM t1; --eval INSERT INTO t1 VALUES ($next_number) } diff --git a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test index d1d0e06e32f..ddfba6c52c5 100644 --- a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test +++ b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test @@ -1,11 +1,9 @@ --source include/rpl_reset.inc ---echo **** On Master **** connection master; eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine; INSERT INTO t1 VALUES (1,1), (2,2); sync_slave_with_master; ---echo **** On Master **** connection master; eval $trunc_stmt t1; sync_slave_with_master; @@ -14,13 +12,11 @@ let $diff_tables= master:t1, slave:t1; source include/diff_tables.inc; --echo ==== Test using a table with delete triggers ==== ---echo **** On Master **** connection master; SET @count := 1; eval CREATE TABLE t2 (a INT, b LONG) ENGINE=$engine; CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1; sync_slave_with_master; ---echo **** On Master **** connection master; eval $trunc_stmt t1; sync_slave_with_master; |