1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

5.5 merge

This commit is contained in:
Sergei Golubchik
2013-06-06 17:51:28 +02:00
464 changed files with 7741 additions and 3075 deletions

View File

@ -1,5 +1,5 @@
/* Copyright (c) 2002, 2011, Oracle and/or its affiliates.
Copyright (c) 2008-2011 Monty Program Ab
/* Copyright (c) 2002, 2013, Oracle and/or its affiliates.
Copyright (c) 2008, 2011, 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
@ -255,16 +255,14 @@ uchar *sys_var::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base)
return session_value_ptr(thd, base);
}
bool sys_var::set_default(THD *thd, enum_var_type type)
bool sys_var::set_default(THD *thd, set_var* var)
{
set_var var(type, this, &null_lex_str, 0);
if (type == OPT_GLOBAL || scope() == GLOBAL)
global_save_default(thd, &var);
if (var->type == OPT_GLOBAL || scope() == GLOBAL)
global_save_default(thd, var);
else
session_save_default(thd, &var);
session_save_default(thd, var);
return check(thd, &var) || update(thd, &var);
return check(thd, var) || update(thd, var);
}
@ -774,7 +772,7 @@ int set_var::light_check(THD *thd)
*/
int set_var::update(THD *thd)
{
return value ? var->update(thd, this) : var->set_default(thd, type);
return value ? var->update(thd, this) : var->set_default(thd, this);
}