1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-10424 - Assertion `ticket == __null' failed in MDL_request::set_type

Reexecution of prepared "ANALYZE TABLE merge_table, table" may miss to
reinitialize "table" for subsequent execution and trigger assertion failure.

This happens because MERGE engine may adjust table->next_global chain, which
gets cleared by close_thread_tables()/ha_myisammrg::detach_children() later.
Since reinitilization iterates next_global chain, it won't see tables following
merge table.

Fixed by appending saved next_global chain after merge children.
This commit is contained in:
Sergey Vojtovich
2016-08-04 15:43:52 +04:00
parent 09cb64682b
commit 723488bba1
3 changed files with 43 additions and 1 deletions

View File

@@ -2880,6 +2880,19 @@ drop tables m1, t1, t4;
drop view t3;
--echo #
--echo # MDEV-10424 - Assertion `ticket == __null' failed in
--echo # MDL_request::set_type
--echo #
CREATE TABLE t1 (f1 INT) ENGINE=MyISAM;
CREATE TABLE tmerge (f1 INT) ENGINE=MERGE UNION=(t1);
PREPARE stmt FROM "ANALYZE TABLE tmerge, t1";
EXECUTE stmt;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DROP TABLE t1, tmerge;
--echo End of 5.5 tests
--disable_result_log