mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
@ -3843,6 +3843,16 @@ retry:
|
||||
|
||||
if (share->is_view)
|
||||
{
|
||||
/*
|
||||
If parent_l of the table_list is non null then a merge table
|
||||
has this view as child table, which is not supported.
|
||||
*/
|
||||
if (table_list->parent_l)
|
||||
{
|
||||
my_error(ER_WRONG_MRG_TABLE, MYF(0));
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
This table is a view. Validate its metadata version: in particular,
|
||||
that it was a view when the statement was prepared.
|
||||
|
Reference in New Issue
Block a user