From 32a77ed6747c03c5a05ad233b02e778111b24fd4 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 Jan 2008 15:38:02 +0800 Subject: [PATCH] Fix for versional test Mask binlog positions, error, warning and other information that are not significant for the test mysql-test/extra/rpl_tests/rpl_max_relay_size.test: Mask out binlog position and DBs in result of show master status mysql-test/extra/rpl_tests/rpl_reset_slave.test: Mask out log positions in tests to make them version independent mysql-test/extra/rpl_tests/rpl_row_tabledefs.test: Mask out Error messages in reslut of show slave status mysql-test/suite/rpl/r/rpl_000015.result: Mask out log positions in tests to make them version independent --- Mask out binlog position and DBs in result of show master status mysql-test/suite/rpl/r/rpl_change_master.result: Mask out log positions in tests to make them version independent mysql-test/suite/rpl/r/rpl_create_database.result: fix for versional test mysql-test/suite/rpl/r/rpl_grant.result: fix for versional test mysql-test/suite/rpl/r/rpl_init_slave.result: fix for versional test mysql-test/suite/rpl/r/rpl_load_from_master.result: update result mysql-test/suite/rpl/r/rpl_log_pos.result: Mask out binlog position and DBs in result of show master status mysql-test/suite/rpl/r/rpl_rotate_logs.result: Mask out binlog position and DBs in result of show master status mysql-test/suite/rpl/r/rpl_row_max_relay_size.result: Mask out binlog position and DBs in result of show master status mysql-test/suite/rpl/r/rpl_row_reset_slave.result: Mask out log positions in tests to make them version independent mysql-test/suite/rpl/r/rpl_skip_error.result: Mask out log positions in tests to make them version independent mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result: Mask out log positions in tests to make them version independent --- Mask out binlog position and DBs in result of show master status mysql-test/suite/rpl/r/rpl_stm_reset_slave.result: Mask out log positions in tests to make them version independent mysql-test/suite/rpl/r/rpl_stm_until.result: Mask out log positions in tests to make them version independent mysql-test/suite/rpl/r/rpl_temporary_errors.result: Mask out binlog positions mysql-test/suite/rpl/t/rpl_000015.test: Mask out log positions in tests to make them version independent mysql-test/suite/rpl/t/rpl_change_master.test: Mask out log positions in tests to make them version independent mysql-test/suite/rpl/t/rpl_colSize.test: fix for versional test mysql-test/suite/rpl/t/rpl_create_database.test: fix for versional test mysql-test/suite/rpl/t/rpl_grant.test: fix for versional test mysql-test/suite/rpl/t/rpl_init_slave.test: fix for versional test mysql-test/suite/rpl/t/rpl_load_from_master.test: fix for versional test mysql-test/suite/rpl/t/rpl_log_pos.test: Mask out binlog position and DBs mysql-test/suite/rpl/t/rpl_rotate_logs.test: Mask out log positions in tests to make them version independent mysql-test/suite/rpl/t/rpl_skip_error.test: Mask out log positions in tests to make them version independent mysql-test/suite/rpl/t/rpl_stm_until.test: Mask out log positions in tests to make them version independent mysql-test/include/show_binary_logs.inc: Mask out log positions in tests to make them version independent mysql-test/include/show_master_logs.inc: Mask out log positions in tests to make them version independent mysql-test/include/show_master_status.inc: Mask out log positions in tests to make them version independent --- Mask out binlog position and DBs in result of show master status mysql-test/include/show_slave_status2.inc: Mask out log positions in tests to make them version independent --- .../extra/rpl_tests/rpl_max_relay_size.test | 15 ++++--- .../extra/rpl_tests/rpl_reset_slave.test | 8 ++-- .../extra/rpl_tests/rpl_row_tabledefs.test | 12 +++--- mysql-test/include/show_binary_logs.inc | 5 +++ mysql-test/include/show_master_logs.inc | 5 +++ mysql-test/include/show_master_status.inc | 5 +++ mysql-test/include/show_slave_status2.inc | 8 ++++ mysql-test/suite/rpl/r/rpl_000015.result | 14 +++---- .../suite/rpl/r/rpl_change_master.result | 4 +- .../suite/rpl/r/rpl_create_database.result | 24 ++++------- mysql-test/suite/rpl/r/rpl_grant.result | 34 +++++++-------- mysql-test/suite/rpl/r/rpl_init_slave.result | 1 + .../suite/rpl/r/rpl_load_from_master.result | 18 +++----- mysql-test/suite/rpl/r/rpl_log_pos.result | 10 ++--- mysql-test/suite/rpl/r/rpl_rotate_logs.result | 39 ++++++++--------- .../suite/rpl/r/rpl_row_max_relay_size.result | 30 +++++++------ .../suite/rpl/r/rpl_row_reset_slave.result | 16 +++---- mysql-test/suite/rpl/r/rpl_skip_error.result | 42 +++++++++++++++++-- .../suite/rpl/r/rpl_stm_max_relay_size.result | 30 +++++++------ .../suite/rpl/r/rpl_stm_reset_slave.result | 16 +++---- mysql-test/suite/rpl/r/rpl_stm_until.result | 16 +++---- .../suite/rpl/r/rpl_temporary_errors.result | 4 +- mysql-test/suite/rpl/t/rpl_000015.test | 10 ++--- mysql-test/suite/rpl/t/rpl_change_master.test | 8 +--- mysql-test/suite/rpl/t/rpl_colSize.test | 4 ++ .../suite/rpl/t/rpl_create_database.test | 8 ++-- mysql-test/suite/rpl/t/rpl_grant.test | 20 ++++----- mysql-test/suite/rpl/t/rpl_init_slave.test | 2 + .../suite/rpl/t/rpl_load_from_master.test | 6 +-- mysql-test/suite/rpl/t/rpl_log_pos.test | 10 ++--- mysql-test/suite/rpl/t/rpl_rotate_logs.test | 18 ++++---- mysql-test/suite/rpl/t/rpl_skip_error.test | 4 +- mysql-test/suite/rpl/t/rpl_stm_until.test | 8 ++-- 33 files changed, 246 insertions(+), 208 deletions(-) create mode 100644 mysql-test/include/show_binary_logs.inc create mode 100644 mysql-test/include/show_master_logs.inc create mode 100644 mysql-test/include/show_master_status.inc create mode 100644 mysql-test/include/show_slave_status2.inc diff --git a/mysql-test/extra/rpl_tests/rpl_max_relay_size.test b/mysql-test/extra/rpl_tests/rpl_max_relay_size.test index 6b84cf67d58..5b546bbd891 100644 --- a/mysql-test/extra/rpl_tests/rpl_max_relay_size.test +++ b/mysql-test/extra/rpl_tests/rpl_max_relay_size.test @@ -43,7 +43,7 @@ set global max_relay_log_size=8192-1; # mapped to 4096 select @@global.max_relay_log_size; start slave; sync_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; --echo # --echo # Test 2 @@ -55,7 +55,7 @@ set global max_relay_log_size=(5*4096); query_vertical select @@global.max_relay_log_size; start slave; sync_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; --echo # --echo # Test 3: max_relay_log_size = 0 @@ -67,7 +67,7 @@ set global max_relay_log_size=0; query_vertical select @@global.max_relay_log_size; start slave; sync_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; --echo # --echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions @@ -78,7 +78,7 @@ reset slave; # test of relay log rotation when the slave is stopped # (to make sure it does not crash). flush logs; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; --echo # --echo # Test 5 @@ -96,7 +96,7 @@ create table t1 (a int); save_master_pos; connection slave; sync_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; --echo # --echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated @@ -108,13 +108,12 @@ drop table t1; save_master_pos; connection slave; sync_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; connection master; # test that the absence of relay logs does not make a master crash flush logs; --- replace_column 3 -query_vertical show master status; +source include/show_master_status.inc; # Restore max_binlog_size connection slave; diff --git a/mysql-test/extra/rpl_tests/rpl_reset_slave.test b/mysql-test/extra/rpl_tests/rpl_reset_slave.test index 83b39d3299a..2cc041a35e1 100644 --- a/mysql-test/extra/rpl_tests/rpl_reset_slave.test +++ b/mysql-test/extra/rpl_tests/rpl_reset_slave.test @@ -13,18 +13,18 @@ connection master; save_master_pos; connection slave; sync_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; stop slave; change master to master_user='test'; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; reset slave; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; start slave; sync_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; # test of crash with temp tables & RESET SLAVE # (test to see if RESET SLAVE clears temp tables in memory and disk) diff --git a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test index 1a6c59d0b83..7f5bfc7a1c9 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test +++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test @@ -122,7 +122,7 @@ INSERT INTO t1_nodef VALUES (1,2); connection slave; --source include/wait_for_slave_sql_to_stop.inc --replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # +--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 # --query_vertical SHOW SLAVE STATUS SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -142,7 +142,7 @@ sync_slave_with_master; --echo **** On Slave **** SELECT * FROM t2; --replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # +--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 # --query_vertical SHOW SLAVE STATUS connection master; @@ -154,7 +154,7 @@ INSERT INTO t4 VALUES (4); connection slave; --source include/wait_for_slave_sql_to_stop.inc --replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # +--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 # --query_vertical SHOW SLAVE STATUS SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -168,7 +168,7 @@ INSERT INTO t5 VALUES (5,10,25); connection slave; --source include/wait_for_slave_sql_to_stop.inc --replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # +--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 # --query_vertical SHOW SLAVE STATUS SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -182,7 +182,7 @@ INSERT INTO t6 VALUES (6,12,36); connection slave; --source include/wait_for_slave_sql_to_stop.inc --replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # +--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 # --query_vertical SHOW SLAVE STATUS SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -191,7 +191,7 @@ connection master; INSERT INTO t9 VALUES (6); sync_slave_with_master; --replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # +--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 # --query_vertical SHOW SLAVE STATUS # Testing some tables extra field that can be null and cannot be null diff --git a/mysql-test/include/show_binary_logs.inc b/mysql-test/include/show_binary_logs.inc new file mode 100644 index 00000000000..c3729a8f9b9 --- /dev/null +++ b/mysql-test/include/show_binary_logs.inc @@ -0,0 +1,5 @@ +# show binary logs + +# mask out the binlog position +-- replace_column 2 # +show binary logs; diff --git a/mysql-test/include/show_master_logs.inc b/mysql-test/include/show_master_logs.inc new file mode 100644 index 00000000000..4792ebd9651 --- /dev/null +++ b/mysql-test/include/show_master_logs.inc @@ -0,0 +1,5 @@ +# show master logs + +# mask out the binlog position +-- replace_column 2 # +query_vertical show master logs; diff --git a/mysql-test/include/show_master_status.inc b/mysql-test/include/show_master_status.inc new file mode 100644 index 00000000000..b7b32a65df4 --- /dev/null +++ b/mysql-test/include/show_master_status.inc @@ -0,0 +1,5 @@ +# show master status + +# mask out the binlog position +-- replace_column 2 # 3 4 +show master status; diff --git a/mysql-test/include/show_slave_status2.inc b/mysql-test/include/show_slave_status2.inc new file mode 100644 index 00000000000..9c4e14c62c2 --- /dev/null +++ b/mysql-test/include/show_slave_status2.inc @@ -0,0 +1,8 @@ +# Include file to show the slave status, masking out some information +# that varies depending on where the test is executed. + +# masked out log positions + +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # +query_vertical SHOW SLAVE STATUS; diff --git a/mysql-test/suite/rpl/r/rpl_000015.result b/mysql-test/suite/rpl/r/rpl_000015.result index 79d87354cb2..03b96d5870b 100644 --- a/mysql-test/suite/rpl/r/rpl_000015.result +++ b/mysql-test/suite/rpl/r/rpl_000015.result @@ -1,7 +1,7 @@ reset master; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 +master-bin.000001 # reset slave; SHOW SLAVE STATUS; change master to master_host='127.0.0.1'; @@ -12,7 +12,7 @@ Master_User test Master_Port 3306 Connect_Retry 7 Master_Log_File -Read_Master_Log_Pos 4 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File @@ -27,7 +27,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 0 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -53,7 +53,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 7 Master_Log_File -Read_Master_Log_Pos 4 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File @@ -68,7 +68,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 0 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -93,7 +93,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 7 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 106 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -108,7 +108,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 106 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result index 7707ca2cf9b..c06c1201e3d 100644 --- a/mysql-test/suite/rpl/r/rpl_change_master.result +++ b/mysql-test/suite/rpl/r/rpl_change_master.result @@ -33,7 +33,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 191 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -73,7 +73,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 191 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_create_database.result b/mysql-test/suite/rpl/r/rpl_create_database.result index 0cfd44bc58c..9780b65f334 100644 --- a/mysql-test/suite/rpl/r/rpl_create_database.result +++ b/mysql-test/suite/rpl/r/rpl_create_database.result @@ -20,21 +20,17 @@ INSERT INTO t2 VALUES(2); ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1; USE mysqltest_sisyfos; ALTER DATABASE mysqltest_bob CHARACTER SET latin1; -SHOW DATABASES; -Database -information_schema +SHOW DATABASES LIKE 'mysql%'; +Database (mysql%) mysql mysqltest_bob mysqltest_prometheus mysqltest_sisyfos -test -SHOW DATABASES; -Database -information_schema +SHOW DATABASES LIKE 'mysql%'; +Database (mysql%) mysql mysqltest_prometheus mysqltest_sisyfos -test DROP DATABASE IF EXISTS mysqltest_sisyfos; USE mysqltest_prometheus; CREATE TABLE t1 (a INT); @@ -42,21 +38,17 @@ INSERT INTO t1 VALUES (1); CREATE DATABASE mysqltest_sisyfos; USE mysqltest_sisyfos; CREATE TABLE t2 (a INT); -SHOW DATABASES; -Database -information_schema +SHOW DATABASES LIKE 'mysql%'; +Database (mysql%) mysql mysqltest_bob mysqltest_prometheus mysqltest_sisyfos -test -SHOW DATABASES; -Database -information_schema +SHOW DATABASES LIKE 'mysql%'; +Database (mysql%) mysql mysqltest_prometheus mysqltest_sisyfos -test USE mysqltest_prometheus; SHOW TABLES; Tables_in_mysqltest_prometheus diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result index 935d1ca67c7..1bed6101e3c 100644 --- a/mysql-test/suite/rpl/r/rpl_grant.result +++ b/mysql-test/suite/rpl/r/rpl_grant.result @@ -7,40 +7,40 @@ start slave; **** On Master **** CREATE USER dummy@localhost; CREATE USER dummy1@localhost, dummy2@localhost; -SELECT user, host FROM mysql.user WHERE user != 'root'; +SELECT user, host FROM mysql.user WHERE user like 'dummy%'; user host dummy localhost dummy1 localhost dummy2 localhost -SELECT COUNT(*) FROM mysql.user; +SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; COUNT(*) -6 +3 **** On Slave **** -SELECT user,host FROM mysql.user WHERE user != 'root'; +SELECT user,host FROM mysql.user WHERE user like 'dummy%'; user host dummy localhost dummy1 localhost dummy2 localhost -SELECT COUNT(*) FROM mysql.user; +SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; COUNT(*) -6 +3 **** On Master **** DROP USER nonexisting@localhost; ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost' DROP USER nonexisting@localhost, dummy@localhost; ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost' DROP USER dummy1@localhost, dummy2@localhost; -SELECT user, host FROM mysql.user WHERE user != 'root'; +SELECT user, host FROM mysql.user WHERE user like 'dummy%'; user host -SELECT COUNT(*) FROM mysql.user; +SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; COUNT(*) -3 +0 **** On Slave **** -SELECT user,host FROM mysql.user WHERE user != 'root'; +SELECT user,host FROM mysql.user WHERE user like 'dummy%'; user host -SELECT COUNT(*) FROM mysql.user; +SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; COUNT(*) -3 +0 SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -48,7 +48,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 617 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -57,13 +57,13 @@ Slave_SQL_Running Yes Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table -Replicate_Ignore_Table +Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 617 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -76,7 +76,7 @@ Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No -Last_IO_Errno 0 -Last_IO_Error +Last_IO_Errno # +Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error diff --git a/mysql-test/suite/rpl/r/rpl_init_slave.result b/mysql-test/suite/rpl/r/rpl_init_slave.result index 740c918976c..01bbd41761f 100644 --- a/mysql-test/suite/rpl/r/rpl_init_slave.result +++ b/mysql-test/suite/rpl/r/rpl_init_slave.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +set global max_connections=151; show variables like 'init_slave'; Variable_name Value init_slave set global max_connections=500 diff --git a/mysql-test/suite/rpl/r/rpl_load_from_master.result b/mysql-test/suite/rpl/r/rpl_load_from_master.result index 08b45ec1db0..e1c2ecb35be 100644 --- a/mysql-test/suite/rpl/r/rpl_load_from_master.result +++ b/mysql-test/suite/rpl/r/rpl_load_from_master.result @@ -30,13 +30,11 @@ drop database mysqltest2; set sql_log_bin = 0; create database mysqltest2; create database mysqltest; -show databases; -Database -information_schema +show databases like 'mysql%'; +Database (mysql%) mysql mysqltest mysqltest2 -test create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; create table mysqltest2.t2(n int, s text)ENGINE=MyISAM; insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three'); @@ -47,11 +45,9 @@ insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three tes insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'), (13, 'thirteen test'); set sql_log_bin = 1; -show databases; -Database -information_schema +show databases like 'mysql%'; +Database (mysql%) mysql -test create database mysqltest2; create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; insert into mysqltest2.t1 values (1, 'original foo.t1'); @@ -66,14 +62,12 @@ insert into mysqltest.t1 values (1, 'original bar.t1'); create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM; insert into mysqltest.t3 values (1, 'original bar.t3'); load data from master; -show databases; -Database -information_schema +show databases like 'mysql%'; +Database (mysql%) mysql mysqltest mysqltest2 mysqltest3 -test use mysqltest2; show tables; Tables_in_mysqltest2 diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result index 0f3552af5bc..e0c4dedde10 100644 --- a/mysql-test/suite/rpl/r/rpl_log_pos.result +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -6,7 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 +master-bin.000001 # stop slave; change master to master_log_pos=75; SHOW SLAVE STATUS; @@ -16,7 +16,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 75 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -31,7 +31,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 75 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -91,12 +91,12 @@ Last_SQL_Errno 0 Last_SQL_Error show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 106 +master-bin.000001 # create table if not exists t1 (n int); drop table if exists t1; create table t1 (n int); insert into t1 values (1),(2),(3); -change master to master_log_pos=106; +change master to master_log_pos=4; start slave; select * from t1 ORDER BY n; n diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result index 2282067ddfd..6314a9a61fb 100644 --- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result +++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result @@ -21,7 +21,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 60 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 556 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -36,7 +36,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 556 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -63,9 +63,9 @@ insert into t2 values (34),(67),(123); flush logs; show binary logs; Log_name File_size -master-bin.000001 600 -master-bin.000002 371 -master-bin.000003 106 +master-bin.000001 # +master-bin.000002 # +master-bin.000003 # create table t3 select * from temp_table; select * from t3; a @@ -78,21 +78,22 @@ set global sql_slave_skip_counter=1; start slave; purge master logs to 'master-bin.000002'; show master logs; -Log_name File_size -master-bin.000002 371 -master-bin.000003 415 +Log_name master-bin.000002 +File_size # +Log_name master-bin.000003 +File_size # purge binary logs to 'master-bin.000002'; show binary logs; Log_name File_size -master-bin.000002 371 -master-bin.000003 415 +master-bin.000002 # +master-bin.000003 # select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND) from information_schema.tables where TABLE_SCHEMA="test" and TABLE_NAME="t2"; purge master logs before (@time_for_purge); show binary logs; Log_name File_size -master-bin.000003 415 +master-bin.000003 # insert into t2 values (65); SHOW SLAVE STATUS; Slave_IO_State # @@ -101,7 +102,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 60 Master_Log_File master-bin.000003 -Read_Master_Log_Pos 504 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000003 @@ -116,7 +117,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 504 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -149,12 +150,12 @@ count(*) create table t4 select * from temp_table; show binary logs; Log_name File_size -master-bin.000003 4193 -master-bin.000004 4198 -master-bin.000005 2040 +master-bin.000003 # +master-bin.000004 # +master-bin.000005 # show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000005 2040 +master-bin.000005 # select * from t4; a testing temporary tables part 2 @@ -165,7 +166,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 60 Master_Log_File master-bin.000005 -Read_Master_Log_Pos 2040 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000005 @@ -180,7 +181,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 2040 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result index 06266f1de82..392f5904233 100644 --- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result +++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result @@ -30,7 +30,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 60268 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -45,7 +45,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 60268 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -78,7 +78,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 60268 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -93,7 +93,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 60268 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -126,7 +126,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 60268 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -141,7 +141,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 60268 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -171,7 +171,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File -Read_Master_Log_Pos 4 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File @@ -186,7 +186,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 0 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -217,7 +217,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 60354 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -232,7 +232,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 60354 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -261,7 +261,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 60430 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -276,7 +276,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 60430 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -295,10 +295,8 @@ Last_SQL_Errno 0 Last_SQL_Error flush logs; show master status; -File master-bin.000002 -Position 106 -Binlog_Do_DB -Binlog_Ignore_DB +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000002 # set global max_binlog_size= @my_max_binlog_size; # # End of 4.1 tests diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result index fd23e254072..6126ec4bacc 100644 --- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result @@ -11,7 +11,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 106 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -26,7 +26,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 106 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -52,7 +52,7 @@ Master_User test Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 106 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -67,7 +67,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 106 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -92,7 +92,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File -Read_Master_Log_Pos 4 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File @@ -107,7 +107,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 0 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -132,7 +132,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 106 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -147,7 +147,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 106 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result index ed4c4a6b3bb..aacc89f7a47 100644 --- a/mysql-test/suite/rpl/r/rpl_skip_error.result +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -29,7 +29,43 @@ select * from t1; a 1 2 -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 851 # # master-bin.000001 Yes Yes 0 0 851 # None 0 No # No 0 0 +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_PORT +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 0 +Last_SQL_Error drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result index 947b5686a18..2215b34814e 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result +++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result @@ -28,7 +28,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 72960 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -43,7 +43,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 72960 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -76,7 +76,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 72960 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -91,7 +91,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 72960 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -124,7 +124,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 72960 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -139,7 +139,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 72960 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -169,7 +169,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File -Read_Master_Log_Pos 4 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File @@ -184,7 +184,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 0 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -215,7 +215,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 73046 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -230,7 +230,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 73046 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -259,7 +259,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 73122 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -274,7 +274,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 73122 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -293,10 +293,8 @@ Last_SQL_Errno 0 Last_SQL_Error flush logs; show master status; -File master-bin.000002 -Position 106 -Binlog_Do_DB -Binlog_Ignore_DB +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000002 # set global max_binlog_size= @my_max_binlog_size; # # End of 4.1 tests diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result index d08e8646c73..bb89d150af7 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result @@ -11,7 +11,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 106 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -26,7 +26,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 106 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -52,7 +52,7 @@ Master_User test Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 106 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -67,7 +67,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 106 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -92,7 +92,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File -Read_Master_Log_Pos 4 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File @@ -107,7 +107,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 0 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File @@ -132,7 +132,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 106 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -147,7 +147,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 106 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result index 947ce0153b1..619115aa534 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_until.result +++ b/mysql-test/suite/rpl/r/rpl_stm_until.result @@ -26,7 +26,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 784 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -41,7 +41,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 327 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition Master Until_Log_File master-bin.000001 @@ -72,7 +72,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 784 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -87,7 +87,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 327 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition Master Until_Log_File master-no-such-bin.000001 @@ -116,7 +116,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 784 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -131,7 +131,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 616 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition Relay Until_Log_File slave-relay-bin.000004 @@ -158,7 +158,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 784 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -173,7 +173,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 784 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition Master Until_Log_File master-bin.000001 diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result index c9d7f4ebff6..430e63c5859 100644 --- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result +++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result @@ -46,7 +46,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 408 +Read_Master_Log_Pos # Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -61,7 +61,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 408 +Exec_Master_Log_Pos # Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/t/rpl_000015.test b/mysql-test/suite/rpl/t/rpl_000015.test index 80db596244b..45a43cd38d0 100644 --- a/mysql-test/suite/rpl/t/rpl_000015.test +++ b/mysql-test/suite/rpl/t/rpl_000015.test @@ -9,22 +9,22 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK); connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK); connection master; reset master; -show master status; +source include/show_master_status.inc; save_master_pos; connection slave; reset slave; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; change master to master_host='127.0.0.1'; # The following needs to be cleaned up when change master is fixed -source include/show_slave_status.inc; +source include/show_slave_status2.inc; --replace_result $MASTER_MYPORT MASTER_PORT eval change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=$MASTER_MYPORT; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; start slave; sync_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; connection master; --disable_warnings drop table if exists t1; diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test index 7256fed656f..7e4800c5c77 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master.test +++ b/mysql-test/suite/rpl/t/rpl_change_master.test @@ -18,13 +18,9 @@ save_master_pos; connection slave; --real_sleep 3 # wait for I/O thread to have read updates stop slave; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 # -query_vertical SHOW SLAVE STATUS; +source include/show_slave_status2.inc; change master to master_user='root'; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 # -query_vertical SHOW SLAVE STATUS; +source include/show_slave_status2.inc; start slave; sync_with_master; select * from t1; diff --git a/mysql-test/suite/rpl/t/rpl_colSize.test b/mysql-test/suite/rpl/t/rpl_colSize.test index 44fb878d4d2..c20f2c3fd35 100644 --- a/mysql-test/suite/rpl/t/rpl_colSize.test +++ b/mysql-test/suite/rpl/t/rpl_colSize.test @@ -147,12 +147,14 @@ INSERT INTO t1 VALUES ("This is a test of col a.", "This is a test of the large col c.", "Col d"); SELECT * FROM t1; +--replace_result default DEFAULT SHOW CREATE TABLE t1; sync_slave_with_master slave; --echo Insert some values and select them on slave SELECT * FROM t1; +--replace_result default DEFAULT SHOW CREATE TABLE t1; @@ -200,12 +202,14 @@ INSERT INTO t1 VALUES ( ); SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1; +--replace_result default DEFAULT SHOW CREATE TABLE t1; sync_slave_with_master slave; --echo Insert some values and select them on master SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1; +--replace_result default DEFAULT SHOW CREATE TABLE t1; --echo *** Cleanup *** diff --git a/mysql-test/suite/rpl/t/rpl_create_database.test b/mysql-test/suite/rpl/t/rpl_create_database.test index 70cff8daca2..e3e2e637594 100644 --- a/mysql-test/suite/rpl/t/rpl_create_database.test +++ b/mysql-test/suite/rpl/t/rpl_create_database.test @@ -42,9 +42,9 @@ USE mysqltest_sisyfos; # The following should *not* be replicated ALTER DATABASE mysqltest_bob CHARACTER SET latin1; -SHOW DATABASES; +SHOW DATABASES LIKE 'mysql%'; sync_slave_with_master; -SHOW DATABASES; +SHOW DATABASES LIKE 'mysql%'; connection master; DROP DATABASE IF EXISTS mysqltest_sisyfos; @@ -55,9 +55,9 @@ CREATE DATABASE mysqltest_sisyfos; USE mysqltest_sisyfos; CREATE TABLE t2 (a INT); let $VERSION=`select version()`; -SHOW DATABASES; +SHOW DATABASES LIKE 'mysql%'; sync_slave_with_master; -SHOW DATABASES; +SHOW DATABASES LIKE 'mysql%'; USE mysqltest_prometheus; SHOW TABLES; USE mysqltest_sisyfos; diff --git a/mysql-test/suite/rpl/t/rpl_grant.test b/mysql-test/suite/rpl/t/rpl_grant.test index 71e36342584..50b243eab92 100644 --- a/mysql-test/suite/rpl/t/rpl_grant.test +++ b/mysql-test/suite/rpl/t/rpl_grant.test @@ -9,12 +9,12 @@ connection master; CREATE USER dummy@localhost; CREATE USER dummy1@localhost, dummy2@localhost; -SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ -SELECT COUNT(*) FROM mysql.user; +SELECT user, host FROM mysql.user WHERE user like 'dummy%'; +SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; sync_slave_with_master; --echo **** On Slave **** -SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ -SELECT COUNT(*) FROM mysql.user; +SELECT user,host FROM mysql.user WHERE user like 'dummy%'; +SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; --echo **** On Master **** connection master; @@ -30,13 +30,11 @@ DROP USER nonexisting@localhost, dummy@localhost; # All users exist DROP USER dummy1@localhost, dummy2@localhost; -SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ -SELECT COUNT(*) FROM mysql.user; +SELECT user, host FROM mysql.user WHERE user like 'dummy%'; +SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; sync_slave_with_master; --echo **** On Slave **** -SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ -SELECT COUNT(*) FROM mysql.user; +SELECT user,host FROM mysql.user WHERE user like 'dummy%'; +SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%'; ---replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # -query_vertical SHOW SLAVE STATUS; +source include/show_slave_status2.inc; diff --git a/mysql-test/suite/rpl/t/rpl_init_slave.test b/mysql-test/suite/rpl/t/rpl_init_slave.test index 6125f0a7c45..d151c9aac8f 100644 --- a/mysql-test/suite/rpl/t/rpl_init_slave.test +++ b/mysql-test/suite/rpl/t/rpl_init_slave.test @@ -4,6 +4,8 @@ source include/master-slave.inc; # Test of init_slave variable # +set global max_connections=151; + save_master_pos; connection slave; show variables like 'init_slave'; diff --git a/mysql-test/suite/rpl/t/rpl_load_from_master.test b/mysql-test/suite/rpl/t/rpl_load_from_master.test index 9bab7d5696e..b04d8a44226 100644 --- a/mysql-test/suite/rpl/t/rpl_load_from_master.test +++ b/mysql-test/suite/rpl/t/rpl_load_from_master.test @@ -54,7 +54,7 @@ connection master; set sql_log_bin = 0; create database mysqltest2; create database mysqltest; -show databases; +show databases like 'mysql%'; create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM; create table mysqltest2.t2(n int, s text)ENGINE=MyISAM; insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three'); @@ -71,7 +71,7 @@ connection slave; sync_with_master; # This should show that the slave is empty at this point -show databases; +show databases like 'mysql%'; # Create mysqltest2 and mysqltest3 on slave; we expect that LOAD DATA FROM # MASTER will neither touch database mysqltest nor mysqltest3 create database mysqltest2; @@ -95,7 +95,7 @@ insert into mysqltest.t3 values (1, 'original bar.t3'); load data from master; # Now let's check if we have the right tables and the right data in them -show databases; +show databases like 'mysql%'; use mysqltest2; # LOAD DATA FROM MASTER uses only replicate_*_db rules to decide which diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test index e5ad6f39ed2..45a097b6f14 100644 --- a/mysql-test/suite/rpl/t/rpl_log_pos.test +++ b/mysql-test/suite/rpl/t/rpl_log_pos.test @@ -11,14 +11,13 @@ # Passes with rbr no problem, removed statement include [jbm] source include/master-slave.inc; ---replace_column 3 -show master status; +source include/show_master_status.inc; sync_slave_with_master; stop slave; --source include/wait_for_slave_to_stop.inc change master to master_log_pos=75; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; start slave; let $slave_param= Slave_SQL_Running; let $slave_param_value= Yes; @@ -31,15 +30,14 @@ stop slave; source include/show_slave_status.inc; connection master; ---replace_column 3 -show master status; +source include/show_master_status.inc; create table if not exists t1 (n int); drop table if exists t1; create table t1 (n int); insert into t1 values (1),(2),(3); save_master_pos; connection slave; -change master to master_log_pos=106; +change master to master_log_pos=4; start slave; sync_with_master; select * from t1 ORDER BY n; diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test index 998bce33e8f..9133c429934 100644 --- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test +++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test @@ -65,14 +65,14 @@ insert into temp_table values ("testing temporary tables"); create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); sync_slave_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; select * from t1; connection master; flush logs; create table t2(m int not null auto_increment primary key); insert into t2 values (34),(67),(123); flush logs; -show binary logs; +source include/show_binary_logs.inc; create table t3 select * from temp_table; sync_slave_with_master; @@ -106,10 +106,10 @@ connection master; sync_slave_with_master; connection master; purge master logs to 'master-bin.000002'; -show master logs; +source include/show_master_logs.inc; # we just tests if synonyms are accepted purge binary logs to 'master-bin.000002'; -show binary logs; +source include/show_binary_logs.inc; # Calculate time to use in "purge master logs before" by taking # last modification time of t2 and adding 1 second @@ -122,10 +122,10 @@ select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND) --enable_result_log purge master logs before (@time_for_purge); -show binary logs; +source include/show_binary_logs.inc; insert into t2 values (65); sync_slave_with_master; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; select * from t2; # @@ -148,14 +148,14 @@ while ($1) enable_query_log; select count(*) from t3 where n >= 4; create table t4 select * from temp_table; -show binary logs; -show master status; +source include/show_binary_logs.inc; +source include/show_master_status.inc; save_master_pos; connection slave; sync_with_master; select * from t4; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; # because of concurrent insert, the table may not be up to date # if we do not lock lock tables t3 read; diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test index 72d434d9c9b..efd46f4fa09 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_error.test +++ b/mysql-test/suite/rpl/t/rpl_skip_error.test @@ -50,9 +50,7 @@ sync_slave_with_master; connection slave; select @@server_id; select * from t1; ---replace_column 1 # 8 # 9 # 23 # 33 # ---replace_result $MASTER_MYPORT MASTER_PORT -show slave status; +source include/show_slave_status2.inc; connection master; drop table t1; sync_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_stm_until.test b/mysql-test/suite/rpl/t/rpl_stm_until.test index c8d3cb1823d..2793e8833fd 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_until.test +++ b/mysql-test/suite/rpl/t/rpl_stm_until.test @@ -31,20 +31,20 @@ start slave until master_log_file='master-bin.000001', master_log_pos=323; --source include/wait_for_slave_sql_to_stop.inc # here table should be still not deleted select * from t1; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; # this should fail right after start start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; --source include/wait_for_slave_sql_to_stop.inc # again this table should be still not deleted select * from t1; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; # try replicate all up to and not including the second insert to t2; start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; --source include/wait_for_slave_sql_to_stop.inc select * from t2; -source include/show_slave_status.inc; +source include/show_slave_status2.inc; # clean up start slave; @@ -61,7 +61,7 @@ start slave until master_log_file='master-bin.000001', master_log_pos=776; --source include/wait_for_slave_sql_to_stop.inc # here the sql slave thread should be stopped --replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 -source include/show_slave_status.inc; +source include/show_slave_status2.inc; #testing various error conditions --error 1277