diff options
author | unknown <gluh@mysql.com/eagle.(none)> | 2007-05-16 19:19:23 +0500 |
---|---|---|
committer | unknown <gluh@mysql.com/eagle.(none)> | 2007-05-16 19:19:23 +0500 |
commit | b6be8fd0b8253b259c05fd6340b9c6fa89d28bda (patch) | |
tree | 2dcf62551419b224e06a288e9d775b75e35f9b22 /sql/sql_show.cc | |
parent | 9949755aeb029cf0728ceeead128467e60dd1551 (diff) | |
download | mariadb-git-b6be8fd0b8253b259c05fd6340b9c6fa89d28bda.tar.gz |
valgrind error fix
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 94442bad188..e8107248c14 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -4546,19 +4546,23 @@ 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; } else - { + { option_type= OPT_SESSION; - if (schema_table_idx == SCH_SESSION_STATUS) - tmp1= &thd->status_var; - else - tmp1= thd->initial_status_var; + tmp1= &thd->status_var; } pthread_mutex_lock(&LOCK_status); |