Commit 91bfc76f authored by Monty's avatar Monty Committed by Sergei Golubchik

MDEV-28351 Assertion `this->file->children_attached' failed in ha_myisammrg::info

Reviewed-by: <vicentiu@mariadb.org>
parent 1923ff8e
......@@ -200,3 +200,17 @@ show index in t;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored
t 1 b 1 b A NULL NULL NULL YES BTREE NO
drop database mysqltest;
#
# MDEV-28351 Assertion `this->file->children_attached' failed in ha_myisammrg::info
#
use test;
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
insert into t1 values (1);
CREATE TEMPORARY TABLE t2 (a INT) ENGINE=MERGE UNION=(t1);
CREATE TABLE t3 (a INT) ENGINE=MERGE UNION=(t1);
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
def test tmp_innodb_in_test TEMPORARY InnoDB 10 Dynamic 0 0 X X X X NULL X X NULL latin1_swedish_ci NULL X Y
def test t3 BASE TABLE MRG_MyISAM 10 Fixed 1 5 X X X X NULL X X NULL latin1_swedish_ci NULL X N
def test t1 BASE TABLE MyISAM 10 Fixed 1 7 X X X X NULL X X NULL latin1_swedish_ci NULL X N
DROP TABLE t1,t2,t3;
......@@ -195,3 +195,15 @@ show index in t;
# Cleanup
drop database mysqltest;
--echo #
--echo # MDEV-28351 Assertion `this->file->children_attached' failed in ha_myisammrg::info
--echo #
use test;
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
insert into t1 values (1);
CREATE TEMPORARY TABLE t2 (a INT) ENGINE=MERGE UNION=(t1);
CREATE TABLE t3 (a INT) ENGINE=MERGE UNION=(t1);
--replace_column 10 X 11 X 12 X 13 X 15 X 16 X 22 X
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test';
DROP TABLE t1,t2,t3;
......@@ -5370,7 +5370,23 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
}
else /* SCH_TABLE */
{
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 its
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);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment