2690 Mats Kindahl 2008-09-09
Fixing test failure for rpl000017.
modified:
mysql-test/include/master-slave-reset.inc
mysql-test/include/master-slave.inc
mysql-test/include/wait_for_slave_param.inc
mysql-test/suite/rpl/r/rpl000017.result
mysql-test/suite/rpl/t/rpl000017.test
2689 He Zhenxing 2008-09-07 [merge]
Merge 5.1-rpl -> 6.1-rpl
Post fix after merge
removed:
mysql-test/install_test_db.sh
mysql-test/suite/rpl/t/rpl000017-slave.opt
added:
mysql-test/install_test_db.sh
modified:
mysql-test/extra/rpl_tests/rpl_log.test
mysql-test/r/csv.result
mysql-test/r/mysqlbinlog_row_trans.result
mysql-test/suite/rpl/r/rpl_row_log.result
mysql-test/suite/rpl/r/rpl_row_log_innodb.result
mysql-test/suite/rpl/r/rpl_stm_log.result
mysql-test/t/csv.test
mysql-test/t/mysqlbinlog_row_trans.test
=== modified file 'mysql-test/include/master-slave-reset.inc'
--- a/mysql-test/include/master-slave-reset.inc 2008-08-04 14:30:50 +0000
+++ b/mysql-test/include/master-slave-reset.inc 2008-09-09 05:23:11 +0000
@@ -6,6 +6,11 @@
# Since we expect STOP SLAVE to produce a warning as the slave is
# stopped (the server was started with skip-slave-start), we disable
# warnings when doing STOP SLAVE.
+#
+# $no_change_master If true, no change master will be done nor any reset slave.
+# This is to avoid touching the relay-log.info file allowing
+# the test to create one itself.
+# $skip_slave_start If true, the slave will not be started
connection slave;
@@ -14,10 +19,12 @@ connection slave;
--disable_warnings
stop slave;
--disable_query_log
-eval CHANGE MASTER TO MASTER_USER='root',
- MASTER_CONNECT_RETRY=1,
- MASTER_HOST='127.0.0.1',
- MASTER_PORT=$MASTER_MYPORT;
+if (!$no_change_master) {
+ eval CHANGE MASTER TO MASTER_USER='root',
+ MASTER_CONNECT_RETRY=1,
+ MASTER_HOST='127.0.0.1',
+ MASTER_PORT=$MASTER_MYPORT;
+}
--enable_query_log
source include/wait_for_slave_to_stop.inc;
--enable_warnings
@@ -30,8 +37,11 @@ use test;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
--enable_warnings
reset master;
+
--disable_query_log
-reset slave;
+if (!$no_change_master) {
+ reset slave;
+}
--enable_query_log
connection slave;
@@ -40,7 +50,9 @@ connection slave;
# 'ndb_apply_status' table, because this table is created
# asynchronously at the server startup and may not exist yet
# if RESET SLAVE comes too soon after the server startup
-reset slave;
+if (!$no_change_master) {
+ reset slave;
+}
--enable_warnings
# Clean up old test tables
@@ -56,5 +68,8 @@ drop table if exists t1,t2,t3,t4,t5,t6,t
reset master;
--enable_query_log
-start slave;
-source include/wait_for_slave_to_start.inc;
+if (!$skip_slave_start) {
+ start slave;
+ source include/wait_for_slave_to_start.inc;
+}
+
=== modified file 'mysql-test/include/master-slave.inc'
--- a/mysql-test/include/master-slave.inc 2008-07-17 19:11:37 +0000
+++ b/mysql-test/include/master-slave.inc 2008-09-09 05:23:11 +0000
@@ -1,4 +1,6 @@
# Replication tests need binlog
+#
+# $skip_slave_start If true, the slave will not be started
source include/have_log_bin.inc;
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
@@ -8,7 +10,10 @@ connect (slave1,127.0.0.1,root,,test,$SL
-- source include/master-slave-reset.inc
-connection master;
-sync_slave_with_master;
+if (!$skip_slave_start) {
+ connection master;
+ sync_slave_with_master;
+}
+
# Set the default connection to 'master'
connection master;
=== modified file 'mysql-test/include/wait_for_slave_param.inc'
--- a/mysql-test/include/wait_for_slave_param.inc 2008-07-10 16:09:39 +0000
+++ b/mysql-test/include/wait_for_slave_param.inc 2008-09-09 05:23:11 +0000
@@ -80,7 +80,10 @@ while (`SELECT NOT('$_show_slave_status_
connection master;
query_vertical SHOW MASTER STATUS;
SHOW PROCESSLIST;
- eval SHOW BINLOG EVENTS IN '$master_binlog_name_sql';
+ if ($master_binlog_name_sql)
+ {
+ eval SHOW BINLOG EVENTS IN '$master_binlog_name_sql';
+ }
if (`SELECT '$master_binlog_name_io' != '$master_binlog_name_sql'`)
{
eval SHOW BINLOG EVENTS IN '$master_binlog_name_io';
=== modified file 'mysql-test/suite/rpl/r/rpl000017.result'
--- a/mysql-test/suite/rpl/r/rpl000017.result 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/r/rpl000017.result 2008-09-09 05:23:11 +0000
@@ -1,10 +1,7 @@
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;
-stop slave;
grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab';
grant replication slave on *.* to replicate@stripped identified by 'aaaaaaaaaaaaaaab';
start slave;
=== modified file 'mysql-test/suite/rpl/t/rpl000017.test'
--- a/mysql-test/suite/rpl/t/rpl000017.test 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl000017.test 2008-09-09 05:23:11 +0000
@@ -1,11 +1,22 @@
+# The test manually replaces the relay-log.info file with connection
+# information which the slave then should pick up. However, to avoid
+# overwriting the file, no CHANGE MASTER TO nor RESET SLAVE statements
+# should be executed.
+#
+# Starting replication before granting a replication user privileges
+# to replicate will cause the start slave to fail, so we shouldn't do
+# that.
+
+let $no_change_master = 1;
+let $skip_slave_start = 1;
source include/master-slave.inc;
-connection slave;
-stop slave;
+
connection master;
grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab';
grant replication slave on *.* to replicate@stripped identified by 'aaaaaaaaaaaaaaab';
connection slave;
start slave;
+
connection master;
--disable_warnings
drop table if exists t1;
| Thread |
|---|
| • bzr push into mysql-6.0 branch (mats:2689 to 2690) | Mats Kindahl | 9 Sep |