mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-5042 - Server crashes when accessing incorrect MERGE table from trigger
When we open merge children open error is normally handled early during open phase. But there are two exceptions when error is handled later during attach phase: CHECK/REPAIR TABLE and tables added by the pre-locking code. The latter case wasn't considered by assertion in the merge code. This assertion is corrected. Note that in MySQL-5.6 this assertion is removed.
This commit is contained in:
@ -3910,6 +3910,8 @@ CREATE TABLE m1(a INT) ENGINE = MERGE UNION (q1, q2);
|
||||
CREATE TRIGGER trg1 BEFORE DELETE ON t1
|
||||
FOR EACH ROW
|
||||
INSERT INTO m1 VALUES (1);
|
||||
DELETE FROM t1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
DROP TRIGGER trg1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE m1;
|
||||
|
Reference in New Issue
Block a user