diff options
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 0acf0c8acb7..ea9bd7cbaed 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -5338,7 +5338,25 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) fill_schema_table_names(thd, tables, &tmp_tbl->s->db, &tmp_tbl->s->table_name, true); else - process_i_s_table_temporary_tables(thd, table, tmp_tbl); + { + if (tmp_tbl->file->ha_table_flags() & HA_CAN_MULTISTEP_MERGE) + { + /* + MyISAM MERGE table. We have to to call open on it and it's + children + */ + LEX_CSTRING table_name= + { tmp_tbl->alias.ptr(), tmp_tbl->alias.length() }; + if (fill_schema_table_by_open(thd, &tmp_mem_root, FALSE, + table, schema_table, + &tmp_tbl->s->db, &table_name, + &open_tables_state_backup, + 0)) + goto err; + } + else + process_i_s_table_temporary_tables(thd, table, tmp_tbl); + } break; } } |