Merge neptunus.(none):/home/msvensson/mysql/wl2930/my50-wl2930-small_fix
into neptunus.(none):/home/msvensson/mysql/wl2930/my51-wl2930-integration client/mysqltest.c: Auto merged
This commit is contained in:
commit
5d5560a503
@ -4207,7 +4207,7 @@ static VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
|
|||||||
val_len = strlen(val) ;
|
val_len = strlen(val) ;
|
||||||
val_alloc_len = val_len + 16; /* room to grow */
|
val_alloc_len = val_len + 16; /* room to grow */
|
||||||
if (!(tmp_var=v) && !(tmp_var = (VAR*)my_malloc(sizeof(*tmp_var)
|
if (!(tmp_var=v) && !(tmp_var = (VAR*)my_malloc(sizeof(*tmp_var)
|
||||||
+ name_len, MYF(MY_WME))))
|
+ name_len+1, MYF(MY_WME))))
|
||||||
die("Out of memory");
|
die("Out of memory");
|
||||||
|
|
||||||
tmp_var->name = (name) ? (char*) tmp_var + sizeof(*tmp_var) : 0;
|
tmp_var->name = (name) ? (char*) tmp_var + sizeof(*tmp_var) : 0;
|
||||||
|
28
mysql-test/r/rpl_ignore_revoke.result
Normal file
28
mysql-test/r/rpl_ignore_revoke.result
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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
|
||||||
|
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';
|
1
mysql-test/t/rpl_ignore_revoke-slave.opt
Normal file
1
mysql-test/t/rpl_ignore_revoke-slave.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--replicate-wild-ignore-table=mysql.%
|
43
mysql-test/t/rpl_ignore_revoke.test
Normal file
43
mysql-test/t/rpl_ignore_revoke.test
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# test verifies that REVOKE must not be replicated when
|
||||||
|
# slave server starts with --replicate-wild-ignore-table=mysql.%
|
||||||
|
# the option is set in rpl_ignore_revoke-slave.opt
|
||||||
|
# The first part of BUG#9483 for GRANT is checked by
|
||||||
|
# existed specific rpl_ignore_grant test case (BUG#980)
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
#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 */;
|
||||||
|
|
||||||
|
|
||||||
|
### TEST
|
||||||
|
|
||||||
|
#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;
|
||||||
|
#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
|
Loading…
x
Reference in New Issue
Block a user