summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2010-12-03 20:49:08 +0300
committerRamil Kalimullin <ramil@mysql.com>2010-12-03 20:49:08 +0300
commitdb2f37dc31a60fdda020e67d19dda79861adadde (patch)
treef6837ac31a18a3beaceeae63ccda5daa0ba45d7a /sql/mysqld.cc
parent6929cd95a6bd9fd9a237f4afede02222840f7033 (diff)
downloadmariadb-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 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 7fec30520d0..09c17d600a8 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -410,7 +410,8 @@ handlerton *heap_hton;
handlerton *myisam_hton;
handlerton *partition_hton;
-my_bool opt_readonly= 0, use_temp_pool, relay_log_purge;
+my_bool read_only= 0, opt_readonly= 0;
+my_bool use_temp_pool, relay_log_purge;
my_bool relay_log_recovery;
my_bool opt_sync_frm, opt_allow_suspicious_udfs;
my_bool opt_secure_auth= 0;
@@ -7342,6 +7343,8 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
test(global_system_variables.optimizer_switch &
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN);
+ opt_readonly= read_only;
+
return 0;
}