diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-06-21 23:54:55 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-06-21 23:54:55 -0400 |
commit | 46024098be1d7887134a3a3d8d289dd7711c56dc (patch) | |
tree | c175b6b9f5913b2c2424ca4fa799b1c545e3d9a5 /sql/sql_show.cc | |
parent | 41d40029875bfd7f4cd6a5255e05a3c93103220f (diff) | |
parent | a6087e7dc1ef3561d8189c8db15e9591d0f9b520 (diff) | |
download | mariadb-git-46024098be1d7887134a3a3d8d289dd7711c56dc.tar.gz |
Merge tag 'mariadb-10.0.20' into 10.0-galera
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index a658abbc7b3..f3e948079e8 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2009, 2014, SkySQL Ab. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. + Copyright (c) 2009, 2015, MariaDB 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 @@ -2305,7 +2305,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) Security_context *tmp_sctx= tmp->security_ctx; struct st_my_thread_var *mysys_var; if ((tmp->vio_ok() || tmp->system_thread) && - (!user || (tmp_sctx->user && !strcmp(tmp_sctx->user, user)))) + (!user || (!tmp->system_thread && + tmp_sctx->user && !strcmp(tmp_sctx->user, user)))) { thread_info *thd_info= new thread_info; @@ -2683,7 +2684,8 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond) ulonglong max_counter; if ((!tmp->vio_ok() && !tmp->system_thread) || - (user && (!tmp_sctx->user || strcmp(tmp_sctx->user, user)))) + (user && (tmp->system_thread || !tmp_sctx->user || + strcmp(tmp_sctx->user, user)))) continue; restore_record(table, s->default_values); @@ -8136,15 +8138,20 @@ bool get_schema_tables_result(JOIN *join, TABLE_LIST *table_list= tab->table->pos_in_table_list; if (table_list->schema_table && thd->fill_information_schema_tables()) { +#if MYSQL_VERSION_ID > 100105 +#error I_S tables only need to be re-populated if make_cond_for_info_schema() will preserve outer fields bool is_subselect= (&lex->unit != lex->current_select->master_unit() && lex->current_select->master_unit()->item); +#else +#define is_subselect false +#endif /* A value of 0 indicates a dummy implementation */ if (table_list->schema_table->fill_table == 0) continue; /* skip I_S optimizations specific to get_all_tables */ - if (thd->lex->describe && + if (lex->describe && (table_list->schema_table->fill_table != get_all_tables)) continue; |