diff options
Diffstat (limited to 'mysql-test/r/read_only.result')
-rw-r--r-- | mysql-test/r/read_only.result | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result index 964c259ebf8..e6fc5e670ef 100644 --- a/mysql-test/r/read_only.result +++ b/mysql-test/r/read_only.result @@ -2,7 +2,7 @@ set @start_read_only= @@global.read_only; DROP TABLE IF EXISTS t1,t2,t3; create user test@localhost; grant CREATE, SELECT, DROP on *.* to test@localhost; -connect (con1,localhost,test,,test); +connect con1,localhost,test,,test; connection default; set global read_only=0; connection con1; @@ -109,7 +109,7 @@ set global read_only=0; flush tables with read lock; set global read_only=1; unlock tables; -connect (root2,localhost,root,,test); +connect root2,localhost,root,,test; connection default; set global read_only=0; flush tables with read lock; @@ -120,6 +120,7 @@ select @@global.read_only; @@global.read_only 1 unlock tables; +disconnect root2; drop temporary table ttt; ERROR 42S02: Unknown table 'test.ttt' drop temporary table if exists ttt; @@ -127,6 +128,7 @@ Warnings: Note 1051 Unknown table 'test.ttt' connection default; set global read_only=0; +disconnect con1; drop table t1,t2; drop user test@localhost; # @@ -145,7 +147,7 @@ grant all on mysqltest_db2.* to `mysqltest_u1`@`%`; create database mysqltest_db1; grant all on mysqltest_db1.* to `mysqltest_u1`@`%`; flush privileges; -connect (con_bug27440,127.0.0.1,mysqltest_u1,,test,MASTER_MYPORT,); +connect con_bug27440,127.0.0.1,mysqltest_u1,,test,$MASTER_MYPORT,; connection con_bug27440; create database mysqltest_db2; ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement @@ -171,6 +173,8 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (1), (2); CREATE USER user1; +connect con1, localhost, user1; +connection default; SET GLOBAL read_only= 1; # All allowed with super privilege START TRANSACTION; @@ -181,6 +185,7 @@ START TRANSACTION READ WRITE; COMMIT; # We allow implicit RW transaction without super privilege # for compatibility reasons +connection con1; START TRANSACTION; # Check that table updates are still disallowed. INSERT INTO t1 VALUES (3); @@ -196,6 +201,8 @@ COMMIT; START TRANSACTION READ WRITE; ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement COMMIT; +disconnect con1; +connection default; DROP USER user1; SET GLOBAL read_only= 0; DROP TABLE t1; |