summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2023-04-01 02:14:39 +0200
committerAnel Husakovic <anel@mariadb.org>2023-04-03 11:40:09 +0200
commit47d6d23fe4c49148c43cb775b012cb0069c79762 (patch)
tree16e6ab88202f0838dac1c4a58fb460d04c350a24 /sql/sql_show.cc
parent8f8c95f46f51909bf73471c8aba5d51ba49f8253 (diff)
downloadmariadb-git-bb-10.10-anel.tar.gz
MDEV-28351 Assertion `this->file->children_attached' failed in ha_myisammrg::infobb-10.10-anel
- Thanks monty@mariadb.org for this commit
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc20
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;
}
}