Commit b6be8fd0 authored by unknown's avatar unknown

valgrind error fix

parent 9949755a
......@@ -4546,8 +4546,15 @@ int fill_status(THD *thd, TABLE_LIST *tables, COND *cond)
enum enum_var_type option_type;
bool upper_case_names= (schema_table_idx != SCH_STATUS);
if (lex->option_type == OPT_GLOBAL ||
schema_table_idx == SCH_GLOBAL_STATUS)
if (schema_table_idx == SCH_STATUS)
{
option_type= lex->option_type;
if (option_type == OPT_GLOBAL)
tmp1= &tmp;
else
tmp1= thd->initial_status_var;
}
else if (schema_table_idx == SCH_GLOBAL_STATUS)
{
option_type= OPT_GLOBAL;
tmp1= &tmp;
......@@ -4555,10 +4562,7 @@ int fill_status(THD *thd, TABLE_LIST *tables, COND *cond)
else
{
option_type= OPT_SESSION;
if (schema_table_idx == SCH_SESSION_STATUS)
tmp1= &thd->status_var;
else
tmp1= thd->initial_status_var;
}
pthread_mutex_lock(&LOCK_status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment