mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-11274: Executing EXPLAIN of complex query over join limit causes server to crash
For this case we have a view that is mergeable but we are not able to merge it in the parent select because that would exceed the maximum tables allowed in the join list, so we materialise this view TABLE_LIST::dervied is NULL for such views, it is only set for views which have ALGORITHM=TEMPTABLE Fixed by making sure TABLE_LIST::derived is set for views that could not be merged
This commit is contained in:
@@ -2125,6 +2125,7 @@ struct TABLE_LIST
|
||||
DBUG_PRINT("enter", ("Alias: '%s' Unit: %p",
|
||||
(alias ? alias : "<NULL>"),
|
||||
get_unit()));
|
||||
derived= get_unit();
|
||||
derived_type= ((derived_type & (derived ? DTYPE_MASK : DTYPE_VIEW)) |
|
||||
DTYPE_TABLE | DTYPE_MATERIALIZE);
|
||||
set_check_materialized();
|
||||
|
Reference in New Issue
Block a user