summaryrefslogtreecommitdiff
path: root/sql/sys_vars.ic
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-09-03 18:06:55 +0200
committerSergei Golubchik <serg@mariadb.org>2015-09-04 10:33:56 +0200
commitbc12d5fd4382ad021b77a875d4b7dbd5f2c38d1c (patch)
treeed6ce95f6ee9ff57b45c494d10f5a19473237e96 /sql/sys_vars.ic
parente3982cead235e9becb1abdbf0e73876c8a6e6b28 (diff)
downloadmariadb-git-bc12d5fd4382ad021b77a875d4b7dbd5f2c38d1c.tar.gz
MDEV-6066: Merge new defaults from 5.6 and 5.7
cosmetic fixes. test fixes.
Diffstat (limited to 'sql/sys_vars.ic')
-rw-r--r--sql/sys_vars.ic70
1 files changed, 24 insertions, 46 deletions
diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic
index ea0e11ed19e..2badd5d997a 100644
--- a/sql/sys_vars.ic
+++ b/sql/sys_vars.ic
@@ -138,8 +138,7 @@ public:
getopt.arg_type, SHOWT, def_val, lock, binlog_status_arg,
on_check_func, on_update_func, substitute)
{
- option.var_type= ARGT;
- fix_auto_flag();
+ option.var_type|= ARGT;
option.min_value= min_val;
option.max_value= max_val;
option.block_size= block_size;
@@ -159,10 +158,9 @@ public:
{
my_bool fixed= FALSE, unused;
longlong v= var->value->val_int();
- ulong vartype= (ARGT & GET_TYPE_MASK);
- if ((vartype == GET_HA_ROWS) || (vartype == GET_UINT) ||
- (vartype == GET_ULONG) || (vartype == GET_ULL))
+ if ((ARGT == GET_HA_ROWS) || (ARGT == GET_UINT) ||
+ (ARGT == GET_ULONG) || (ARGT == GET_ULL))
{
ulonglong uv;
@@ -345,8 +343,7 @@ public:
binlog_status_arg, on_check_func, on_update_func,
substitute)
{
- option.var_type= GET_ENUM;
- fix_auto_flag();
+ option.var_type|= GET_ENUM;
global_var(ulong)= def_val;
SYSVAR_ASSERT(def_val < typelib.count);
SYSVAR_ASSERT(size == sizeof(ulong));
@@ -397,8 +394,7 @@ public:
binlog_status_arg, on_check_func, on_update_func,
substitute)
{
- option.var_type= GET_BOOL;
- fix_auto_flag();
+ option.var_type|= GET_BOOL;
global_var(my_bool)= def_val;
SYSVAR_ASSERT(def_val < 2);
SYSVAR_ASSERT(getopt.arg_type == OPT_ARG || getopt.id < 0);
@@ -464,8 +460,7 @@ public:
otherwise (GET_STR) you'll never know whether to free it or not.
(think of an exit because of an error right after my_getopt)
*/
- option.var_type= (flags & ALLOCATED) ? GET_STR_ALLOC : GET_STR;
- fix_auto_flag();
+ option.var_type|= (flags & ALLOCATED) ? GET_STR_ALLOC : GET_STR;
global_var(const char*)= def_val;
SYSVAR_ASSERT(scope() == GLOBAL);
SYSVAR_ASSERT(size == sizeof(char *));
@@ -552,8 +547,7 @@ public:
NULL, NULL, NULL)
{
is_os_charset= is_os_charset_arg == IN_FS_CHARSET;
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
}
bool do_check(THD *thd, set_var *var)
{
@@ -609,8 +603,7 @@ public:
NO_ARG, SHOW_CHAR, 0, NULL, VARIABLE_NOT_IN_BINLOG,
NULL, NULL, NULL), opt_id(getopt_id)
{
- option.var_type= GET_STR | GET_ASK_ADDR;
- fix_auto_flag();
+ option.var_type|= GET_STR | GET_ASK_ADDR;
}
bool do_check(THD *thd, set_var *var)
@@ -699,8 +692,7 @@ public:
0, VARIABLE_NOT_IN_BINLOG, on_check_func, on_update_func,
0),max_length(max_length_arg)
{
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
SYSVAR_ASSERT(scope() == ONLY_SESSION)
*const_cast<SHOW_TYPE*>(&show_val_type)= SHOW_LEX_STRING;
}
@@ -787,7 +779,7 @@ public:
getopt.arg_type, SHOW_CHAR, (intptr)def_val,
lock, binlog_status_arg, on_check_func, on_update_func,
substitute)
- { option.var_type= GET_STR; fix_auto_flag(); }
+ { option.var_type|= GET_STR; }
bool do_check(THD *thd, set_var *var)
{
char buff[STRING_BUFFER_USUAL_SIZE];
@@ -1034,8 +1026,7 @@ public:
lock, binlog_status_arg, on_check_func, on_update_func,
substitute)
{
- option.var_type= GET_DOUBLE;
- fix_auto_flag();
+ option.var_type|= GET_DOUBLE;
option.min_value= (longlong) getopt_double2ulonglong(min_val);
option.max_value= (longlong) getopt_double2ulonglong(max_val);
global_var(double)= (double)option.def_value;
@@ -1136,8 +1127,7 @@ public:
binlog_status_arg, on_check_func, on_update_func,
substitute)
{
- option.var_type= GET_FLAGSET;
- fix_auto_flag();
+ option.var_type|= GET_FLAGSET;
global_var(ulonglong)= def_val;
SYSVAR_ASSERT(typelib.count > 1);
SYSVAR_ASSERT(typelib.count <= 65);
@@ -1246,8 +1236,7 @@ public:
binlog_status_arg, on_check_func, on_update_func,
substitute)
{
- option.var_type= GET_SET;
- fix_auto_flag();
+ option.var_type|= GET_SET;
global_var(ulonglong)= def_val;
SYSVAR_ASSERT(typelib.count > 0);
SYSVAR_ASSERT(typelib.count <= 64);
@@ -1352,8 +1341,7 @@ public:
substitute),
plugin_type(plugin_type_arg)
{
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
SYSVAR_ASSERT(size == sizeof(plugin_ref));
SYSVAR_ASSERT(getopt.id < 0); // force NO_CMD_LINE
}
@@ -1469,8 +1457,7 @@ public:
substitute)
{
SYSVAR_ASSERT(scope() == ONLY_SESSION);
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
}
bool do_check(THD *thd, set_var *var)
{
@@ -1562,8 +1549,7 @@ public:
binlog_status_arg, on_check_func, on_update_func,
substitute)
{
- option.var_type= GET_BOOL;
- fix_auto_flag();
+ option.var_type|= GET_BOOL;
reverse_semantics= my_count_bits(bitmask_arg) > 1;
bitmask= reverse_semantics ? ~bitmask_arg : bitmask_arg;
set(global_var_ptr(), def_val);
@@ -1771,8 +1757,7 @@ public:
SYSVAR_ASSERT(is_readonly());
SYSVAR_ASSERT(on_update == 0);
SYSVAR_ASSERT(size == sizeof(enum SHOW_COMP_OPTION));
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
}
bool do_check(THD *thd, set_var *var) {
DBUG_ASSERT(FALSE);
@@ -1834,8 +1819,7 @@ public:
substitute),
name_offset(name_off)
{
- option.var_type= GET_ENUM; // because we accept INT and STRING here
- fix_auto_flag();
+ option.var_type|= GET_ENUM; // because we accept INT and STRING here
/*
struct variables are special on the command line - often (e.g. for
charsets) the name cannot be immediately resolved, but only after all
@@ -1904,8 +1888,7 @@ public:
{
SYSVAR_ASSERT(getopt.id < 0);
SYSVAR_ASSERT(size == sizeof(Time_zone *));
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
}
bool do_check(THD *thd, set_var *var)
{
@@ -2124,8 +2107,7 @@ public:
{
SYSVAR_ASSERT(getopt.id < 0);
SYSVAR_ASSERT(is_readonly());
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
}
bool do_check(THD *thd, set_var *var)
{
@@ -2174,8 +2156,7 @@ public:
{
SYSVAR_ASSERT(getopt.id < 0);
SYSVAR_ASSERT(is_readonly());
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
}
bool do_check(THD *thd, set_var *var)
{
@@ -2222,8 +2203,7 @@ public:
getopt.arg_type, SHOW_CHAR, 0, NULL, VARIABLE_NOT_IN_BINLOG,
NULL, NULL, NULL)
{
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
}
bool do_check(THD *thd, set_var *var);
bool session_update(THD *thd, set_var *var)
@@ -2265,8 +2245,7 @@ public:
getopt.arg_type, SHOW_CHAR, 0, NULL, VARIABLE_NOT_IN_BINLOG,
NULL, NULL, NULL)
{
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
}
bool do_check(THD *thd, set_var *var);
bool session_update(THD *thd, set_var *var)
@@ -2309,8 +2288,7 @@ public:
{
SYSVAR_ASSERT(getopt.id < 0);
SYSVAR_ASSERT(is_readonly());
- option.var_type= GET_STR;
- fix_auto_flag();
+ option.var_type|= GET_STR;
}
bool do_check(THD *thd, set_var *var)
{