diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2010-12-03 20:49:08 +0300 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2010-12-03 20:49:08 +0300 |
commit | db2f37dc31a60fdda020e67d19dda79861adadde (patch) | |
tree | f6837ac31a18a3beaceeae63ccda5daa0ba45d7a /mysql-test/r | |
parent | 6929cd95a6bd9fd9a237f4afede02222840f7033 (diff) | |
download | mariadb-git-mysql-5.5.8.tar.gz |
Fix for bug #58669: read_only not enforced on 5.5.xmysql-5.5.8
Problem: "read-only" option ignored if it's enabled in
the command line (or in the config file).
Fix: sync opt_readonly (which is used for checks) with
read_only (global var) when all server options are handled.
mysql-test/r/bug58669.result:
Fix for bug #58669: read_only not enforced on 5.5.x
- test result.
mysql-test/t/bug58669-master.opt:
Fix for bug #58669: read_only not enforced on 5.5.x
- test case.
mysql-test/t/bug58669.test:
Fix for bug #58669: read_only not enforced on 5.5.x
- test case.
sql/mysqld.cc:
Fix for bug #58669: read_only not enforced on 5.5.x
- sync opt_readonly boolean with read_only boolean
in the get_options().
sql/mysqld.h:
Fix for bug #58669: read_only not enforced on 5.5.x
- sync opt_readonly boolean with read_only boolean
in the get_options().
sql/sys_vars.cc:
Fix for bug #58669: read_only not enforced on 5.5.x
- sync opt_readonly boolean with read_only boolean
in the get_options().
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/bug58669.result | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/bug58669.result b/mysql-test/r/bug58669.result new file mode 100644 index 00000000000..5504c5908be --- /dev/null +++ b/mysql-test/r/bug58669.result @@ -0,0 +1,17 @@ +# +# Bug#58669: read_only not enforced on 5.5.x +# +CREATE USER user1@localhost; +CREATE DATABASE db1; +GRANT ALL PRIVILEGES ON db1.* TO user1@localhost; +CREATE TABLE db1.t1(a INT); +SELECT CURRENT_USER(); +CURRENT_USER() +user1@localhost +SHOW VARIABLES LIKE "%read_only%"; +Variable_name Value +read_only ON +INSERT INTO db1.t1 VALUES (1); +ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement +DROP DATABASE db1; +DROP USER user1@localhost; |