diff options
author | Varun Gupta <varunraiko1803@gmail.com> | 2018-03-24 03:31:18 +0530 |
---|---|---|
committer | Varun Gupta <varunraiko1803@gmail.com> | 2018-03-27 11:16:15 +0300 |
commit | bdab8b74ff24a25ecbc7aa96addc54767a6c7146 (patch) | |
tree | 2dd99cede4a04f0fa81040978c94e825101257a8 /sql | |
parent | e8c2366bf87a89f87feac16d1cf98551ddb6bd40 (diff) | |
download | mariadb-git-bdab8b74ff24a25ecbc7aa96addc54767a6c7146.tar.gz |
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
Diffstat (limited to 'sql')
-rw-r--r-- | sql/table.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h index 98f8c7ad73f..fcf214d3582 100644 --- a/sql/table.h +++ b/sql/table.h @@ -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(); |