Below is the list of changes that have just been committed into a local
5.0 repository of serg. When serg 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@stripped, 2007-12-19 21:31:04+01:00, serg@stripped +3 -0
correct invalid values in SET GLOBAL var=DEFAULT
bug#33382
mysql-test/r/variables.result@stripped, 2007-12-19 21:31:00+01:00, serg@stripped +1 -1
typo in a test case
mysql-test/t/variables.test@stripped, 2007-12-19 21:31:01+01:00, serg@stripped +1 -1
typo in a test case
sql/set_var.cc@stripped, 2007-12-19 21:31:01+01:00, serg@stripped +19 -7
correct invalid values in SET GLOBAL var=DEFAULT
diff -Nrup a/mysql-test/r/variables.result b/mysql-test/r/variables.result
--- a/mysql-test/r/variables.result 2007-11-30 06:32:02 +01:00
+++ b/mysql-test/r/variables.result 2007-12-19 21:31:00 +01:00
@@ -182,7 +182,7 @@ show global variables like 'myisam_max_s
Variable_name Value
myisam_max_sort_file_size 1048576
set GLOBAL myisam_max_sort_file_size=default;
-show variables like 'myisam_max_sort_file_size';
+show global variables like 'myisam_max_sort_file_size';
Variable_name Value
myisam_max_sort_file_size FILE_SIZE
set global net_retry_count=10, session net_retry_count=10;
diff -Nrup a/mysql-test/t/variables.test b/mysql-test/t/variables.test
--- a/mysql-test/t/variables.test 2007-12-13 11:49:11 +01:00
+++ b/mysql-test/t/variables.test 2007-12-19 21:31:01 +01:00
@@ -127,7 +127,7 @@ set GLOBAL myisam_max_sort_file_size=200
show global variables like 'myisam_max_sort_file_size';
set GLOBAL myisam_max_sort_file_size=default;
--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE
-show variables like 'myisam_max_sort_file_size';
+show global variables like 'myisam_max_sort_file_size';
set global net_retry_count=10, session net_retry_count=10;
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
diff -Nrup a/sql/set_var.cc b/sql/set_var.cc
--- a/sql/set_var.cc 2007-12-13 11:49:12 +01:00
+++ b/sql/set_var.cc 2007-12-19 21:31:01 +01:00
@@ -113,8 +113,7 @@ static int check_max_delayed_threads(THD
static void fix_thd_mem_root(THD *thd, enum_var_type type);
static void fix_trans_mem_root(THD *thd, enum_var_type type);
static void fix_server_id(THD *thd, enum_var_type type);
-static ulonglong fix_unsigned(THD *thd, ulonglong num,
- const struct my_option *option_limits);
+static ulonglong fix_unsigned(THD *, ulonglong, const struct my_option *);
static bool get_unsigned(THD *thd, set_var *var);
static void throw_bounds_warning(THD *thd, const char *name, ulonglong num);
static KEY_CACHE *create_key_cache(const char *name, uint length);
@@ -1524,8 +1523,10 @@ bool sys_var_long_ptr_global::update(THD
void sys_var_long_ptr_global::set_default(THD *thd, enum_var_type type)
{
+ bool not_used;
pthread_mutex_lock(guard);
- *value= (ulong) option_limits->def_value;
+ *value= (ulong) getopt_ull_limit_value((ulong) option_limits->def_value,
+ option_limits, ¬_used);
pthread_mutex_unlock(guard);
}
@@ -1545,8 +1546,10 @@ bool sys_var_ulonglong_ptr::update(THD *
void sys_var_ulonglong_ptr::set_default(THD *thd, enum_var_type type)
{
+ bool not_used;
pthread_mutex_lock(&LOCK_global_system_variables);
- *value= (ulonglong) option_limits->def_value;
+ *value= getopt_ull_limit_value((ulonglong) option_limits->def_value,
+ option_limits, ¬_used);
pthread_mutex_unlock(&LOCK_global_system_variables);
}
@@ -1616,8 +1619,11 @@ void sys_var_thd_ulong::set_default(THD
{
if (type == OPT_GLOBAL)
{
+ bool not_used;
/* We will not come here if option_limits is not set */
- global_system_variables.*offset= (ulong) option_limits->def_value;
+ global_system_variables.*offset=
+ getopt_ull_limit_value((ulong) option_limits->def_value,
+ option_limits, ¬_used);
}
else
thd->variables.*offset= global_system_variables.*offset;
@@ -1660,9 +1666,12 @@ void sys_var_thd_ha_rows::set_default(TH
{
if (type == OPT_GLOBAL)
{
+ bool not_used;
/* We will not come here if option_limits is not set */
pthread_mutex_lock(&LOCK_global_system_variables);
- global_system_variables.*offset= (ha_rows) option_limits->def_value;
+ global_system_variables.*offset=
+ (ha_rows) getopt_ull_limit_value((ha_rows) option_limits->def_value,
+ option_limits, ¬_used);
pthread_mutex_unlock(&LOCK_global_system_variables);
}
else
@@ -1709,8 +1718,11 @@ void sys_var_thd_ulonglong::set_default(
{
if (type == OPT_GLOBAL)
{
+ bool not_used;
pthread_mutex_lock(&LOCK_global_system_variables);
- global_system_variables.*offset= (ulonglong) option_limits->def_value;
+ global_system_variables.*offset=
+ getopt_ull_limit_value((ulonglong) option_limits->def_value,
+ option_limits, ¬_used);
pthread_mutex_unlock(&LOCK_global_system_variables);
}
else
| Thread |
|---|
| • bk commit into 5.0 tree (serg:1.2583) BUG#33382 | Sergei Golubchik | 19 Dec |