List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:January 6 2006 6:05pm
Subject:bk commit into 5.0 tree (aelkin:1.2020) BUG#9483
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of elkin. When elkin 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
  1.2020 06/01/06 20:04:58 aelkin@stripped +3 -0
  BUG#9483 test verifies that grant/revoke must not be replicated when 
  slave server starts with --replicate-wild-ignore-table=mysql.%

  mysql-test/t/rpl_grant_ignore.test
    1.1 06/01/06 20:04:53 aelkin@stripped +59 -0
    New BitKeeper file ``mysql-test/t/rpl_grant_ignore.test''

  mysql-test/t/rpl_grant_ignore-slave.opt
    1.1 06/01/06 20:04:53 aelkin@stripped +1 -0
    New BitKeeper file ``mysql-test/t/rpl_grant_ignore-slave.opt''

  mysql-test/t/rpl_grant_ignore.test
    1.0 06/01/06 20:04:53 aelkin@stripped +0 -0
    BitKeeper file /usr_rh9/home/elkin.rh9/MySQL/mysql-5.0-bug9483/mysql-test/t/rpl_grant_ignore.test

  mysql-test/t/rpl_grant_ignore-slave.opt
    1.0 06/01/06 20:04:53 aelkin@stripped +0 -0
    BitKeeper file /usr_rh9/home/elkin.rh9/MySQL/mysql-5.0-bug9483/mysql-test/t/rpl_grant_ignore-slave.opt

  mysql-test/r/rpl_grant_ignore.result
    1.1 06/01/06 20:04:52 aelkin@stripped +37 -0
    New BitKeeper file ``mysql-test/r/rpl_grant_ignore.result''

  mysql-test/r/rpl_grant_ignore.result
    1.0 06/01/06 20:04:52 aelkin@stripped +0 -0
    BitKeeper file /usr_rh9/home/elkin.rh9/MySQL/mysql-5.0-bug9483/mysql-test/r/rpl_grant_ignore.result

# 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:	aelkin
# Host:	dsl-hkigw8-fe02f800-41.dhcp.inet.fi
# Root:	/usr_rh9/home/elkin.rh9/MySQL/mysql-5.0-bug9483
--- New file ---
+++ mysql-test/r/rpl_grant_ignore.result	06/01/06 20:04:52
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;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;
select_priv
N
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* slave:must be N */;
select_priv
N
use test;
use test;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
select select_priv from mysql.user where user='user_foo' /* master:must be Y */;
select_priv
Y
select select_priv from mysql.user where user='user_foo' /* slave:must be N */;
select_priv
N
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
select select_priv from mysql.user where user='user_foo' /* slave:must be Y */;
select_priv
Y
revoke select on *.* from 'user_foo';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;
select_priv
N
select select_priv from mysql.user where user='user_foo' /* slave:must get Y */;
select_priv
Y
revoke select on *.* FROM 'user_foo';

--- New file ---
+++ mysql-test/t/rpl_grant_ignore-slave.opt	06/01/06 20:04:53
--replicate-wild-ignore-table=mysql.%

--- New file ---
+++ mysql-test/t/rpl_grant_ignore.test	06/01/06 20:04:53
# test verifies that grant/revoke must not be replicated when 
# slave server starts with --replicate-wild-ignore-table=mysql.%
# the option is set in rpl_grant_ignore-slave.opt

source include/master-slave.inc;

###  CLEAN-UP: create an account and manually duplicate it on the slave

connection master;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;

sync_slave_with_master slave;
#connection slave;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* slave:must be N */;

### INIT 

connection master;
use test;

connection slave;
use test;

### TEST

## 1. Grant

connection master;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
select select_priv from mysql.user where user='user_foo' /* master:must be Y */;

sync_slave_with_master slave;
#connection slave;
select select_priv from mysql.user where user='user_foo' /* slave:must be N */;


## 2. Revoke
#connection slave;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
select select_priv from mysql.user where user='user_foo' /* slave:must be Y */;

connection master;
revoke select on *.* from 'user_foo';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;

sync_slave_with_master slave;
#connection slave;
select select_priv from mysql.user where user='user_foo' /* slave:must get Y */;

### CLEAN-UP

connection slave;
--disable_abort_on_error
revoke select on *.* FROM 'user_foo';
--enable_abort_on_error

Thread
bk commit into 5.0 tree (aelkin:1.2020) BUG#9483Andrei Elkin6 Jan