MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:rsomla Date:April 16 2008 8:02am
Subject:bk commit into 6.0 tree (rafal:1.2614) BUG#36116
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of rafal.  When rafal 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-16 10:02:48+02:00, rafal@quant.(none) +2 -0
  BUG#36116 (Nondet. failures in rpl_slave_status test)
  
  Probable cause of the failures is missing FLUSH PRIVILEGES after creating a new user and directly
  manipulating mysql.user table instead of using DROP USER. The patch fixes these issues.

  mysql-test/suite/rpl/r/rpl_slave_status.result@stripped, 2008-04-16 10:02:42+02:00, rafal@quant.(none) +2 -2
    Updated results.

  mysql-test/suite/rpl/t/rpl_slave_status.test@stripped, 2008-04-16 10:02:42+02:00, rafal@quant.(none) +5 -4
    - Add FLUSH PRIVILEGES and sync master with slave after creating new user.
    - Use DROP USER instead of DELETE FROM mysql.user.
    - Don't delete user on slave since DROP USER on master is replicated.

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 16:07:13 +01:00
+++ b/mysql-test/suite/rpl/r/rpl_slave_status.result	2008-04-16 10:02:42 +02:00
@@ -5,6 +5,7 @@ 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';
+flush privileges;
 stop slave;
 change master to master_user='rpl',master_password='rpl';
 start slave;
@@ -14,7 +15,7 @@ insert into t1 values (1);
 select * from t1;
 n
 1
-delete from mysql.user where user='rpl';
+drop user rpl@stripped;
 flush privileges;
 stop slave;
 start slave;
@@ -58,5 +59,4 @@ Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
 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 13:07:33 +01:00
+++ b/mysql-test/suite/rpl/t/rpl_slave_status.test	2008-04-16 10:02:42 +02:00
@@ -9,8 +9,9 @@
 # 1. Create new replication user
 connection master;
 grant replication slave on *.* to rpl@stripped identified by 'rpl';
+flush privileges;
+sync_slave_with_master;
 
-connection slave;
 stop slave;
 change master to master_user='rpl',master_password='rpl';
 start slave;
@@ -28,10 +29,11 @@ sync_with_master;
 select * from t1;
 
 # 3. Delete new replication user
+# note: drop user will be replicated on slave
 connection master;
-delete from mysql.user where user='rpl';
+drop user rpl@stripped;
 flush privileges;
-connection slave;
+sync_slave_with_master;
 
 # 4. Restart slave without privileges
 # (slave.err will contain access denied error for this START SLAVE command)
@@ -49,7 +51,6 @@ show slave status;
 # Cleanup (Note that slave IO thread is not running)
 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
 
Thread
bk commit into 6.0 tree (rafal:1.2614) BUG#36116rsomla16 Apr