List:Commits« Previous MessageNext Message »
From:Jonathan Miller Date:December 6 2006 8:12pm
Subject:bk commit into 5.1 tree (jmiller:1.2375) BUG#16563
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of ndbdev. When ndbdev 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, 2006-12-06 21:11:58+01:00, jmiller@stripped +2 -0
  Test case for bug#16563

  mysql-test/r/rpl_grant.result@stripped, 2006-12-06 20:59:32+01:00, jmiller@stripped +38 -0
    Test case for bug 16563

  mysql-test/r/rpl_grant.result@stripped, 2006-12-06 20:59:32+01:00, jmiller@stripped +0 -0

  mysql-test/t/rpl_grant.test@stripped, 2006-12-06 20:59:11+01:00, jmiller@stripped +79 -0
    Test case for bug 16563

  mysql-test/t/rpl_grant.test@stripped, 2006-12-06 20:59:11+01:00, jmiller@stripped +0 -0

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jmiller
# Host:	ndb08.mysql.com
# Root:	/data2/mysql-5.1-new-rpl
--- New file ---
+++ mysql-test/r/rpl_grant.result	06/12/06 20:59:32
GRANT ALL ON *.* TO 'jonathan'@'%';
USE mysql;
SELECT user, Repl_slave_priv FROM user WHERE user = 'jonathan';
user	Repl_slave_priv
jonathan	Y
stop slave;
Warnings:
Note	1255	Slave already has been stopped
reset slave;
reset master;
start slave;
GRANT ALL ON *.* TO 'jonathan'@'%';
GRANT REPLICATION SLAVE ON *.* TO 'jonathan'@'%' IDENTIFIED BY 'test';
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
#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	331	slave-relay-bin.000003	#	master-bin.000001	#	Yes							0		0	331	#	None		0	No						#
REVOKE REPLICATION SLAVE ON *.* FROM 'jonathan'@'%';
USE mysql;
SELECT user, Repl_slave_priv FROM user WHERE user = 'jonathan';
user	Repl_slave_priv
jonathan	N
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
#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	445	slave-relay-bin.000003	#	master-bin.000001	#	Yes							0		0	445	#	None		0	No						#
USE mysql;
SELECT user, Repl_slave_priv FROM user WHERE user = 'jonathan';
user	Repl_slave_priv
jonathan	N
DROP USER 'jonathan'@'%';
USE mysql;
SELECT user FROM user WHERE user = 'jonathan';
user
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
#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	533	slave-relay-bin.000003	#	master-bin.000001	#	Yes							0		0	533	#	None		0	No						#
USE mysql;
SELECT user FROM user WHERE user = 'jonathan';
user

--- New file ---
+++ mysql-test/t/rpl_grant.test	06/12/06 20:59:11
#######################################
# Author: JBM
# Date: 12-04-2006
# Purpose: Bug #16563   RBR: Adding grants to master
#          for slave to connect cause slave to get error
##########################################

#Setup connections
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,);
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,);

#########
# Test 1 straight grants for a user that already exists
# on the slave mysqld
#########

# Connect to and setup slave
connection slave;
GRANT ALL ON *.* TO 'jonathan'@'%';
USE mysql;
SELECT user, Repl_slave_priv FROM user WHERE user = 'jonathan';
stop slave;
--wait_for_slave_to_stop
reset slave;

# Connect to and cleanup master 
connection master;
reset master;

# Start the slave now that the master has been cleaned
connection slave;
start slave;

# Connect to master and grant permissions
connection master;
GRANT ALL ON *.* TO 'jonathan'@'%';
GRANT REPLICATION SLAVE ON *.* TO 'jonathan'@'%' IDENTIFIED BY 'test';

# Connect back to slave and ensure that the slave is still running
--sync_slave_with_master
--replace_result $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 9 # 11 # 23 # 33 #
show slave status;

########
# Test 2: Remove permissions from Master
########

# Now removed the permissions and make sure they are replicated
connection master;
REVOKE REPLICATION SLAVE ON *.* FROM 'jonathan'@'%';
USE mysql;
SELECT user, Repl_slave_priv FROM user WHERE user = 'jonathan';

# Connect back to slave and ensure that the slave is still running
--sync_slave_with_master
--replace_result $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 9 # 11 # 23 # 33 #
show slave status;
USE mysql;
SELECT user, Repl_slave_priv FROM user WHERE user = 'jonathan';

# cleanup the mysql database 
connection master;
DROP USER 'jonathan'@'%';
USE mysql;
SELECT user FROM user WHERE user = 'jonathan';

# Ckeck the slave
--sync_slave_with_master
--replace_result $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 9 # 11 # 23 # 33 #
show slave status;
USE mysql;
SELECT user FROM user WHERE user = 'jonathan';

# End of 5.1 Test Case

Thread
bk commit into 5.1 tree (jmiller:1.2375) BUG#16563Jonathan Miller6 Dec