Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1943 05/05/13 16:18:27 ramil@stripped +4 -0
a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count ').
sql/set_var.h
1.65 05/05/13 16:18:21 ramil@stripped +2 -0
a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count ').
sys_var::is_readonly() method introduced.
sql/set_var.cc
1.110 05/05/13 16:18:21 ramil@stripped +5 -0
a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count ').
test for read only variables added.
mysql-test/t/variables.test
1.39 05/05/13 16:18:20 ramil@stripped +8 -0
a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count ').
mysql-test/r/variables.result
1.63 05/05/13 16:18:20 ramil@stripped +4 -0
a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count ').
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: ramil
# Host: gw.mysql.r18.ru
# Root: /usr/home/ram/work/5.0.b6267
--- 1.62/mysql-test/r/variables.result 2005-05-06 01:01:35 +05:00
+++ 1.63/mysql-test/r/variables.result 2005-05-13 16:18:20 +05:00
@@ -526,3 +526,7 @@
Level Code Message
Warning 1329 No data to FETCH
drop table t1;
+set @@warning_count=1;
+ERROR HY000: Variable 'warning_count' is a read only variable
+set @@global.error_count=1;
+ERROR HY000: Variable 'error_count' is a read only variable
--- 1.38/mysql-test/t/variables.test 2005-04-02 08:02:07 +05:00
+++ 1.39/mysql-test/t/variables.test 2005-05-13 16:18:20 +05:00
@@ -395,3 +395,11 @@
show warnings;
drop table t1;
+#
+# Bug #10339: read only variables.
+#
+
+--error 1238
+set @@warning_count=1;
+--error 1238
+set @@global.error_count=1;
--- 1.109/sql/set_var.cc 2005-05-05 20:09:13 +05:00
+++ 1.110/sql/set_var.cc 2005-05-13 16:18:21 +05:00
@@ -2964,6 +2964,11 @@
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;
--- 1.64/sql/set_var.h 2005-05-09 14:26:47 +05:00
+++ 1.65/sql/set_var.h 2005-05-13 16:18:21 +05:00
@@ -75,6 +75,7 @@
{ return option_limits == 0; }
Item *item(THD *thd, enum_var_type type, LEX_STRING *base);
virtual bool is_struct() { return 0; }
+ virtual bool is_readonly() const { return 0; }
};
@@ -699,6 +700,7 @@
return (*value_ptr_func)(thd);
}
SHOW_TYPE type() { return show_type; }
+ bool is_readonly() const { return 1; }
};
class sys_var_thd_time_zone :public sys_var_thd
| Thread |
|---|
| • bk commit into 5.0 tree (ramil:1.1943) BUG#10339 | ramil | 13 May |