diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-12-20 09:15:01 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-12-20 09:15:01 +0100 |
commit | 8634f7e5285021370c100850a7d1a4ee0dc1c93e (patch) | |
tree | f84f50ea07aa742c21000877f26e7555f46c387e /mysql-test | |
parent | f16d4d4c6ee81cfee3b0d1cb2f2219b1fa982e2e (diff) | |
parent | b0fd06a6f27212cee770961171439a44626d8f14 (diff) | |
download | mariadb-git-8634f7e5285021370c100850a7d1a4ee0dc1c93e.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/read_only.result | 15 | ||||
-rw-r--r-- | mysql-test/t/read_only.test | 21 |
2 files changed, 31 insertions, 5 deletions
diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result index ee35549eb78..da4926f1a9e 100644 --- a/mysql-test/r/read_only.result +++ b/mysql-test/r/read_only.result @@ -163,11 +163,23 @@ flush privileges; drop database mysqltest_db1; set global read_only= @start_read_only; # +# MDEV-16987 - ALTER DATABASE possible in read-only mode +# +GRANT ALTER ON test1.* TO user1@localhost; +CREATE DATABASE test1; +SET GLOBAL read_only=1; +ALTER DATABASE test1 CHARACTER SET utf8; +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +SET GLOBAL read_only=0; +DROP DATABASE test1; +DROP USER user1@localhost; +USE test; +# End of 5.5 tests +# # WL#5968 Implement START TRANSACTION READ (WRITE|ONLY); # # # Test interaction with read_only system variable. -DROP TABLE IF EXISTS t1; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (1), (2); CREATE USER user1; @@ -199,3 +211,4 @@ COMMIT; DROP USER user1; SET GLOBAL read_only= 0; DROP TABLE t1; +# End of 10.0 tests diff --git a/mysql-test/t/read_only.test b/mysql-test/t/read_only.test index 691c4104148..de5b548142a 100644 --- a/mysql-test/t/read_only.test +++ b/mysql-test/t/read_only.test @@ -307,6 +307,22 @@ flush privileges; drop database mysqltest_db1; set global read_only= @start_read_only; +--echo # +--echo # MDEV-16987 - ALTER DATABASE possible in read-only mode +--echo # +GRANT ALTER ON test1.* TO user1@localhost; +CREATE DATABASE test1; +SET GLOBAL read_only=1; +change_user user1; +--error ER_OPTION_PREVENTS_STATEMENT +ALTER DATABASE test1 CHARACTER SET utf8; +change_user root; +SET GLOBAL read_only=0; +DROP DATABASE test1; +DROP USER user1@localhost; +USE test; + +--echo # End of 5.5 tests --echo # --echo # WL#5968 Implement START TRANSACTION READ (WRITE|ONLY); @@ -315,10 +331,6 @@ set global read_only= @start_read_only; --echo # --echo # Test interaction with read_only system variable. ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (1), (2); @@ -369,3 +381,4 @@ DROP TABLE t1; # Wait till all disconnects are completed --source include/wait_until_count_sessions.inc +--echo # End of 10.0 tests |