summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-05-13 16:18:27 +0500
committerunknown <ramil@mysql.com>2005-05-13 16:18:27 +0500
commit7c1d520ef1a18ad397499de6d70debe5be81dd99 (patch)
treee0309c4f096ab1e6169944c36be8eb9af6208aae /sql/set_var.cc
parent4acfc0b6111fb069cc718b6b87d821407190999e (diff)
downloadmariadb-git-7c1d520ef1a18ad397499de6d70debe5be81dd99.tar.gz
a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count ').
sql/set_var.cc: a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count '). test for read only variables added. sql/set_var.h: a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count '). sys_var::is_readonly() method introduced.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 4add5d6b39b..56b44d980d2 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -2964,6 +2964,11 @@ bool not_all_support_one_shot(List<set_var_base> *var_list)
int set_var::check(THD *thd)
{
+ if (var->is_readonly())
+ {
+ my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), var->name, "read only");
+ return -1;
+ }
if (var->check_type(type))
{
int err= type == OPT_GLOBAL ? ER_LOCAL_VARIABLE : ER_GLOBAL_VARIABLE;