mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#20166 mysql-test-run.pl does not test system privilege tables creation
- Additional fixes caused by running without anonymous users
This commit is contained in:
@ -49,7 +49,6 @@ SOCKET '',
|
|||||||
OWNER 'root');
|
OWNER 'root');
|
||||||
select * from mysql.servers;
|
select * from mysql.servers;
|
||||||
Server_name Host Db Username Password Port Socket Wrapper Owner
|
Server_name Host Db Username Password Port Socket Wrapper Owner
|
||||||
test localhost test root 0 mysql root
|
|
||||||
server_one 127.0.0.1 first_db root SLAVE_PORT mysql root
|
server_one 127.0.0.1 first_db root SLAVE_PORT mysql root
|
||||||
server_two 127.0.0.1 second_db root SLAVE_PORT mysql root
|
server_two 127.0.0.1 second_db root SLAVE_PORT mysql root
|
||||||
DROP TABLE IF EXISTS federated.old;
|
DROP TABLE IF EXISTS federated.old;
|
||||||
@ -101,7 +100,6 @@ drop server 'server_one';
|
|||||||
drop server 'server_two';
|
drop server 'server_two';
|
||||||
select * from mysql.servers;
|
select * from mysql.servers;
|
||||||
Server_name Host Db Username Password Port Socket Wrapper Owner
|
Server_name Host Db Username Password Port Socket Wrapper Owner
|
||||||
test localhost test root 0 mysql root
|
|
||||||
drop table first_db.t1;
|
drop table first_db.t1;
|
||||||
drop table second_db.t1;
|
drop table second_db.t1;
|
||||||
drop database first_db;
|
drop database first_db;
|
||||||
|
@ -4,6 +4,7 @@ reset master;
|
|||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
|
create user test;
|
||||||
create table t1(a int) engine=InnoDB;
|
create table t1(a int) engine=InnoDB;
|
||||||
create table t2(a int) engine=MyISAM;
|
create table t2(a int) engine=MyISAM;
|
||||||
insert into t1 values(1001);
|
insert into t1 values(1001);
|
||||||
@ -109,5 +110,6 @@ insert into t1 values(1006);
|
|||||||
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
||||||
insert into t2 values(2006);
|
insert into t2 values(2006);
|
||||||
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
|
||||||
|
drop user test;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
@ -22,15 +22,15 @@ CALL mysqltest1.p1();
|
|||||||
SELECT * FROM mysqltest1.t1 ORDER BY a;
|
SELECT * FROM mysqltest1.t1 ORDER BY a;
|
||||||
a users
|
a users
|
||||||
1 tester@localhost
|
1 tester@localhost
|
||||||
2 @localhost
|
2 @localhost%
|
||||||
3 tester@localhost
|
3 tester@localhost
|
||||||
4 @localhost
|
4 @localhost%
|
||||||
SELECT * FROM mysqltest1.t1 ORDER BY a;
|
SELECT * FROM mysqltest1.t1 ORDER BY a;
|
||||||
a users
|
a users
|
||||||
1 tester@localhost
|
1 tester@localhost
|
||||||
2 @localhost
|
2 @localhost%
|
||||||
3 tester@localhost
|
3 tester@localhost
|
||||||
4 @localhost
|
4 @localhost%
|
||||||
DROP DATABASE mysqltest1;
|
DROP DATABASE mysqltest1;
|
||||||
REVOKE ALL ON mysqltest1.* FROM 'tester'@'%';
|
REVOKE ALL ON mysqltest1.* FROM 'tester'@'%';
|
||||||
REVOKE ALL ON mysqltest1.* FROM ''@'localhost%';
|
REVOKE ALL ON mysqltest1.* FROM ''@'localhost%';
|
||||||
|
@ -23,8 +23,8 @@ select * from t2;
|
|||||||
show status like 'handler_discover%';
|
show status like 'handler_discover%';
|
||||||
|
|
||||||
# Check dropping and recreating table on same server
|
# Check dropping and recreating table on same server
|
||||||
connect (con1,localhost,,,test);
|
connect (con1,localhost,root,,test);
|
||||||
connect (con2,localhost,,,test);
|
connect (con2,localhost,root,,test);
|
||||||
connection con1;
|
connection con1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
connection con2;
|
connection con2;
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
|
# Create a test and replicate it to slave
|
||||||
|
connection master;
|
||||||
|
create user test;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
# Setting the master readonly :
|
# Setting the master readonly :
|
||||||
# - the variable @@readonly is not replicated on the slave
|
# - the variable @@readonly is not replicated on the slave
|
||||||
|
|
||||||
@ -99,6 +104,7 @@ insert into t2 values(2006);
|
|||||||
|
|
||||||
## Cleanup
|
## Cleanup
|
||||||
connection master;
|
connection master;
|
||||||
|
drop user test;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
Reference in New Issue
Block a user