mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +01:00
66a0403602
Not replicating the mysql database *at all* any more. All changes to mysql tables are replicated by replicating the statements that do the changes. mysql-test/r/rpl_do_grant.result: Result change mysql-test/t/rpl_do_grant.test: Deleting grants on both master and server since the mysql database is not replicated any more. sql/handler.cc: Removing code that selectively checks what tables in the mysql database to ignore. The entire mysql database is not replicated any more. sql/log_event.cc: Disabling code to reload grants and access when certain tables are touched. sql/rpl_rli.h: Removing unused code. sql/slave.cc: Removing unused code. sql/sql_class.cc: Mysql queries (i.e., queries that affects tables in the mysql database) are now replicated by statement instead of replicating the tables in the mysql database.
80 lines
3.6 KiB
Text
80 lines
3.6 KiB
Text
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;
|
|
delete from mysql.user where user=_binary'rpl_do_grant';
|
|
delete from mysql.db where user=_binary'rpl_do_grant';
|
|
flush privileges;
|
|
delete from mysql.user where user=_binary'rpl_ignore_grant';
|
|
delete from mysql.db where user=_binary'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<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
|
|
password<>_binary''
|
|
1
|
|
delete from mysql.user where user=_binary'rpl_do_grant';
|
|
delete from mysql.db where user=_binary'rpl_do_grant';
|
|
flush privileges;
|
|
delete from mysql.user where user=_binary'rpl_do_grant';
|
|
delete from mysql.db where user=_binary'rpl_do_grant';
|
|
flush privileges;
|
|
show grants for rpl_do_grant@localhost;
|
|
ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost'
|
|
show grants for rpl_do_grant@localhost;
|
|
ERROR 42000: There is no such grant defined for user 'rpl_do_grant' on host 'localhost'
|
|
create user rpl_do_grant@localhost;
|
|
show grants for rpl_do_grant@localhost;
|
|
Grants for rpl_do_grant@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost'
|
|
show grants for rpl_do_grant2@localhost;
|
|
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
|
|
show grants for rpl_do_grant@localhost;
|
|
Grants for rpl_do_grant@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost'
|
|
show grants for rpl_do_grant2@localhost;
|
|
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
|
|
rename user rpl_do_grant@localhost to rpl_do_grant2@localhost;
|
|
show grants for rpl_do_grant2@localhost;
|
|
Grants for rpl_do_grant2@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
|
|
show grants for rpl_do_grant2@localhost;
|
|
Grants for rpl_do_grant2@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
|
|
grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost;
|
|
show grants for rpl_do_grant2@localhost;
|
|
Grants for rpl_do_grant2@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
|
|
GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost'
|
|
show grants for rpl_do_grant2@localhost;
|
|
Grants for rpl_do_grant2@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
|
|
GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost'
|
|
revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost;
|
|
show grants for rpl_do_grant2@localhost;
|
|
Grants for rpl_do_grant2@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
|
|
GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost'
|
|
show grants for rpl_do_grant2@localhost;
|
|
Grants for rpl_do_grant2@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
|
|
GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost'
|
|
revoke all privileges, grant option from rpl_do_grant2@localhost;
|
|
show grants for rpl_do_grant2@localhost;
|
|
Grants for rpl_do_grant2@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
|
|
show grants for rpl_do_grant2@localhost;
|
|
Grants for rpl_do_grant2@localhost
|
|
GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost'
|
|
drop user rpl_do_grant2@localhost;
|
|
show grants for rpl_do_grant2@localhost;
|
|
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
|
|
show grants for rpl_do_grant2@localhost;
|
|
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
|