diff options
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 9310b65e44a..da372d9063d 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -476,7 +476,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path, table_list.table_name= file->name; table_list.table_name_length= strlen(file->name); table_list.grant.privilege=col_access; - if (check_grant(thd, TABLE_ACLS, &table_list, 1, UINT_MAX, 1)) + if (check_grant(thd, TABLE_ACLS, &table_list, 1, 1, 1)) continue; } #endif @@ -4664,7 +4664,8 @@ bool get_schema_tables_result(JOIN *join) TABLE_LIST *table_list= tab->table->pos_in_table_list; if (table_list->schema_table && thd->fill_derived_tables()) { - bool is_subselect= (&lex->unit != lex->current_select->master_unit()); + bool is_subselect= (&lex->unit != lex->current_select->master_unit() && + lex->current_select->master_unit()->item); /* The schema table is already processed and the statement is not a subselect. |