diff options
author | unknown <serg@janus.mylan> | 2007-12-19 22:35:46 +0100 |
---|---|---|
committer | unknown <serg@janus.mylan> | 2007-12-19 22:35:46 +0100 |
commit | 82aee4efdb75eca30b50a562e8b0dc2b1a1e12ee (patch) | |
tree | ccfa40f14c56d2ba4ecb1542769c0a4ac80d7d5a | |
parent | 25fa7692ad6550eb1e400be6d288e2f0c75dcd42 (diff) | |
parent | 154933ec02af9281e84892a3d41edaaafa868cb7 (diff) | |
download | mariadb-git-82aee4efdb75eca30b50a562e8b0dc2b1a1e12ee.tar.gz |
Merge janus.mylan:/usr/home/serg/Abk/mysql-5.0
into janus.mylan:/usr/home/serg/Abk/mysql-5.1
mysql-test/r/variables.result:
Auto merged
sql/set_var.cc:
Auto merged
mysql-test/t/variables.test:
merged
-rw-r--r-- | mysql-test/r/variables.result | 2 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 6 | ||||
-rw-r--r-- | sql/set_var.cc | 26 |
3 files changed, 23 insertions, 11 deletions
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index e57f82aca26..658a3ffa7a1 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -220,7 +220,7 @@ select * from information_schema.global_variables where variable_name like 'myis VARIABLE_NAME VARIABLE_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 select * from information_schema.session_variables where variable_name like 'myisam_max_sort_file_size'; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index c1580390f63..dd332a4f528 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -141,9 +141,9 @@ set GLOBAL myisam_max_sort_file_size=2000000; show global variables like 'myisam_max_sort_file_size'; select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size'; set GLOBAL myisam_max_sort_file_size=default; ---replace_result 2147483647 FILE_SIZE 9223372036854775807 FILE_SIZE -show variables like 'myisam_max_sort_file_size'; ---replace_result 2147483647 FILE_SIZE 9223372036854775807 FILE_SIZE +--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE +show global variables like 'myisam_max_sort_file_size'; +--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE select * from information_schema.session_variables where variable_name like 'myisam_max_sort_file_size'; set global net_retry_count=10, session net_retry_count=10; diff --git a/sql/set_var.cc b/sql/set_var.cc index a01a0b49dbc..5552eca9c22 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -120,8 +120,7 @@ static int check_max_delayed_threads(THD *thd, set_var *var); 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); @@ -1178,8 +1177,10 @@ bool sys_var_long_ptr_global::update(THD *thd, set_var *var) 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); } @@ -1199,8 +1200,10 @@ bool sys_var_ulonglong_ptr::update(THD *thd, set_var *var) 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); } @@ -1277,8 +1280,11 @@ void sys_var_thd_ulong::set_default(THD *thd, enum_var_type type) { 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; @@ -1321,9 +1327,12 @@ void sys_var_thd_ha_rows::set_default(THD *thd, enum_var_type type) { 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 @@ -1370,8 +1379,11 @@ void sys_var_thd_ulonglong::set_default(THD *thd, enum_var_type type) { 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 |