mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
3b013646e1
replicate-*-table rules which exclude 'mysql' tables (e.g. replicate-wild-ignore-table=mysql.%). This was already the behaviour for GRANT/REVOKE, I'm extending it to SET PASSWORD because it seems very logical (the contrary seems illogical). 2 new tests: - one to test if GRANT and SET PASSWORD are replicated - one to test if they are not replicated if replicate-wild-ignore-table=mysql.% The 2nd is also a testcase for BUG#980. sql/sql_acl.cc: Fix so that SET PASSWORD is not replicated by the slave if running with replicate-*-table rules which exclude 'mysql' tables (e.g. replicate-wild-ignore-table=mysql.%). This was already the behaviour for GRANT/REVOKE, I'm extending it to SET PASSWORD because it seems very logical (the contrary seems illogical).
26 lines
941 B
Text
26 lines
941 B
Text
slave stop;
|
|
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;
|
|
slave start;
|
|
delete from mysql.user where user='rpl_do_grant';
|
|
delete from mysql.db where user='rpl_do_grant';
|
|
flush privileges;
|
|
delete from mysql.user where user='rpl_ignore_grant';
|
|
delete from mysql.db where user='rpl_ignore_grant';
|
|
flush privileges;
|
|
grant select on *.* to rpl_do_grant@localhost;
|
|
grant drop on test.* to rpl_do_grant@localhost;
|
|
show grants for rpl_do_grant@localhost;
|
|
Grants for rpl_do_grant@localhost
|
|
GRANT SELECT ON *.* TO 'rpl_do_grant'@'localhost'
|
|
GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost'
|
|
set password for rpl_do_grant@localhost=password("does it work?");
|
|
select password<>'' from mysql.user where user='rpl_do_grant';
|
|
password<>''
|
|
1
|
|
delete from mysql.user where user='rpl_do_grant';
|
|
delete from mysql.db where user='rpl_do_grant';
|
|
flush privileges;
|
|
flush privileges;
|