mariadb/mysql-test/t/rpl_grant.test

43 lines
1.2 KiB
Text
Raw Normal View History

# Tests of grants and users
source include/master-slave.inc;
source include/not_embedded.inc;
--echo **** On Master ****
connection master;
CREATE USER dummy@localhost;
CREATE USER dummy1@localhost, dummy2@localhost;
2007-06-21 16:55:52 +02:00
SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ
SELECT COUNT(*) FROM mysql.user;
sync_slave_with_master;
--echo **** On Slave ****
2007-06-21 16:55:52 +02:00
SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ
SELECT COUNT(*) FROM mysql.user;
--echo **** On Master ****
connection master;
# No user exists
error ER_CANNOT_USER;
DROP USER nonexisting@localhost;
# At least one user exists, but not all
error ER_CANNOT_USER;
DROP USER nonexisting@localhost, dummy@localhost;
# All users exist
DROP USER dummy1@localhost, dummy2@localhost;
2007-06-21 16:55:52 +02:00
SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ
SELECT COUNT(*) FROM mysql.user;
sync_slave_with_master;
--echo **** On Slave ****
2007-06-21 16:55:52 +02:00
SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ
SELECT COUNT(*) FROM mysql.user;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 23 # 33 #
query_vertical SHOW SLAVE STATUS;