Below is the list of changes that have just been committed into a local
5.1 repository of skozlov. When skozlov does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-04-07 16:36:21+04:00, skozlov@stripped +2 -0
rpl_slave_status.test
Added waiting start/stop slave via primitives.
mysql-test/suite/rpl/r/rpl_slave_status.result@stripped, 2008-04-07 16:36:18+04:00,
skozlov@stripped +16 -16
updated result
mysql-test/suite/rpl/t/rpl_slave_status.test@stripped, 2008-04-07 16:36:18+04:00,
skozlov@stripped +33 -29
updated test case
diff -Nrup a/mysql-test/suite/rpl/r/rpl_slave_status.result
b/mysql-test/suite/rpl/r/rpl_slave_status.result
--- a/mysql-test/suite/rpl/r/rpl_slave_status.result 2008-03-10 18:07:13 +03:00
+++ b/mysql-test/suite/rpl/r/rpl_slave_status.result 2008-04-07 16:36:18 +04:00
@@ -4,21 +4,21 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-grant replication slave on *.* to rpl@stripped identified by 'rpl';
-stop slave;
-change master to master_user='rpl',master_password='rpl';
-start slave;
-drop table if exists t1;
-create table t1 (n int);
-insert into t1 values (1);
-select * from t1;
+GRANT REPLICATION SLAVE ON *.* TO rpl@stripped IDENTIFIED BY 'rpl';
+STOP SLAVE;
+CHANGE MASTER TO master_user='rpl',master_password='rpl';
+START SLAVE;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (n int);
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1;
n
1
-delete from mysql.user where user='rpl';
-flush privileges;
-stop slave;
-start slave;
-show slave status;
+DELETE FROM mysql.user WHERE user='rpl';
+FLUSH PRIVILEGES;
+STOP SLAVE;
+START SLAVE;
+SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User rpl
@@ -57,6 +57,6 @@ Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
-drop table t1;
-delete from mysql.user where user='rpl';
-drop table t1;
+DROP TABLE t1;
+DELETE FROM mysql.user WHERE user='rpl';
+DROP TABLE t1;
diff -Nrup a/mysql-test/suite/rpl/t/rpl_slave_status.test
b/mysql-test/suite/rpl/t/rpl_slave_status.test
--- a/mysql-test/suite/rpl/t/rpl_slave_status.test 2008-03-12 15:07:33 +03:00
+++ b/mysql-test/suite/rpl/t/rpl_slave_status.test 2008-04-07 16:36:18 +04:00
@@ -1,42 +1,46 @@
---source include/master-slave.inc
-
############################################################################
# Test case for BUG#10780
#
# REQUIREMENT
# A slave without replication privileges should have Slave_IO_Running = No
+############################################################################
+--source include/master-slave.inc
# 1. Create new replication user
-connection master;
-grant replication slave on *.* to rpl@stripped identified by 'rpl';
+--connection master
+GRANT REPLICATION SLAVE ON *.* TO rpl@stripped IDENTIFIED BY 'rpl';
-connection slave;
-stop slave;
-change master to master_user='rpl',master_password='rpl';
-start slave;
+--connection slave
+STOP SLAVE;
+--source include/wait_for_slave_to_stop.inc
+CHANGE MASTER TO master_user='rpl',master_password='rpl';
+START SLAVE;
+--source include/wait_for_slave_to_start.inc
# 2. Do replication as new user
-connection master;
+--connection master
--disable_warnings
-drop table if exists t1;
+DROP TABLE IF EXISTS t1;
--enable_warnings
-create table t1 (n int);
-insert into t1 values (1);
-save_master_pos;
-connection slave;
-sync_with_master;
-select * from t1;
+CREATE TABLE t1 (n int);
+INSERT INTO t1 VALUES (1);
+--sync_slave_with_master
+SELECT * FROM t1;
# 3. Delete new replication user
-connection master;
-delete from mysql.user where user='rpl';
-flush privileges;
-connection slave;
+--connection master
+DELETE FROM mysql.user WHERE user='rpl';
+FLUSH PRIVILEGES;
+--connection slave
# 4. Restart slave without privileges
# (slave.err will contain access denied error for this START SLAVE command)
-stop slave;
-start slave;
+STOP SLAVE;
+--source include/wait_for_slave_to_stop.inc
+START SLAVE;
+--let $slave_param= Slave_SQL_Running
+--let $slave_param_value= Yes
+--source include/wait_for_slave_param.inc
# 5. Make sure Slave_IO_Running = No
--replace_result $MASTER_MYPORT MASTER_MYPORT
@@ -44,16 +48,16 @@ start slave;
# "Connecting to master" or "Waiting for master update"
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 #
--vertical_results
-show slave status;
+SHOW SLAVE STATUS;
# Cleanup (Note that slave IO thread is not running)
-connection slave;
-drop table t1;
-delete from mysql.user where user='rpl';
+--connection slave
+DROP TABLE t1;
+DELETE FROM mysql.user WHERE user='rpl';
# cleanup: slave io thread has been stopped "irrecoverably"
# so we clean up mess manually
-connection master;
-drop table t1;
+--connection master
+DROP TABLE t1;
-# end of 4.1 tests
+# End of 4.1 tests
| Thread |
|---|
| • bk commit into 5.1 tree (skozlov:1.2559) | Serge Kozlov | 7 Apr 2008 |