mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#44040 MySQL allows creating a MERGE table upon VIEWs but crashes when
using it. The crash was due to a null pointer present for select_lex while processing the view. Adding a check while opening the view to see if its a child of a merge table fixed this problem.
This commit is contained in:
@ -2115,4 +2115,16 @@ insert into m1 (col1) values (1);
|
||||
insert into m1 (col1) values (1);
|
||||
ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
|
||||
drop table m1, t1;
|
||||
CREATE TABLE t1 (
|
||||
col1 INT(10)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
CREATE VIEW v1 as SELECT * FROM t1;
|
||||
CREATE TABLE m1 (
|
||||
col1 INT(10)
|
||||
)ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(v1);
|
||||
#Select should detect that the child table is a view and fail.
|
||||
SELECT * FROM m1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
DROP VIEW v1;
|
||||
DROP TABLE m1, t1;
|
||||
End of 5.1 tests
|
||||
|
Reference in New Issue
Block a user