diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-09-06 22:31:30 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-09-06 22:31:30 +0200 |
commit | b838d081ad346e52787753b1799c627922c4a6c7 (patch) | |
tree | dc8f1e21e6b40d5b72668571c570c9a3214fbf32 /sql/sys_vars.h | |
parent | 824db55ce53963a64fcf648b54500df22c57e9b2 (diff) | |
parent | 72c36f4415815d55ddb82b23682f3c549906c00e (diff) | |
download | mariadb-git-b838d081ad346e52787753b1799c627922c4a6c7.tar.gz |
mysql-5.5.33 merge
Diffstat (limited to 'sql/sys_vars.h')
-rw-r--r-- | sql/sys_vars.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/sys_vars.h b/sql/sys_vars.h index b7be81afd73..3cbd24f1c89 100644 --- a/sql/sys_vars.h +++ b/sql/sys_vars.h @@ -1,4 +1,5 @@ -/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. + Copyright (c) 2010, 2013, Monty Program Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -138,6 +139,7 @@ public: option.u_max_value= (uchar**)max_var_ptr(); if (max_var_ptr()) *max_var_ptr()= max_val; + global_var(T)= def_val; SYSVAR_ASSERT(size == sizeof(T)); SYSVAR_ASSERT(min_val < max_val); @@ -904,13 +906,14 @@ public: on_update_function on_update_func=0, const char *substitute=0) : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id, - getopt.arg_type, SHOW_DOUBLE, (longlong) double2ulonglong(def_val), + getopt.arg_type, SHOW_DOUBLE, + (longlong) getopt_double2ulonglong(def_val), lock, binlog_status_arg, on_check_func, on_update_func, substitute) { option.var_type= GET_DOUBLE; - option.min_value= (longlong) double2ulonglong(min_val); - option.max_value= (longlong) double2ulonglong(max_val); + option.min_value= (longlong) getopt_double2ulonglong(min_val); + option.max_value= (longlong) getopt_double2ulonglong(max_val); global_var(double)= (double)option.def_value; SYSVAR_ASSERT(min_val < max_val); SYSVAR_ASSERT(min_val <= def_val); @@ -942,7 +945,7 @@ public: void session_save_default(THD *thd, set_var *var) { var->save_result.double_value= global_var(double); } void global_save_default(THD *thd, set_var *var) - { var->save_result.double_value= (double)option.def_value; } + { var->save_result.double_value= getopt_ulonglong2double(option.def_value); } }; /** |