mirror of
https://github.com/MariaDB/server.git
synced 2026-04-29 11:45:32 +02:00
BUG#860300: Second crash with get_fanout_with_deps() with semijoin + materialization
- Make get_post_group_estimate() take into account semi-join materialization nests.
This commit is contained in:
parent
c85d1efc82
commit
35ecfa90e3
4 changed files with 62 additions and 1 deletions
|
|
@ -4394,7 +4394,13 @@ double get_fanout_with_deps(JOIN *join, table_map tset)
|
|||
for (JOIN_TAB *tab= first_top_level_tab(join, WITHOUT_CONST_TABLES); tab;
|
||||
tab= next_top_level_tab(join, tab))
|
||||
{
|
||||
if ((tab->table->map & checked_deps) && !tab->emb_sj_nest &&
|
||||
/*
|
||||
Ignore SJM nests. They have tab->table==NULL. There is no point to walk
|
||||
inside them, because GROUP BY clause cannot refer to tables from within
|
||||
subquery.
|
||||
*/
|
||||
if (!tab->is_sjm_nest() && (tab->table->map & checked_deps) &&
|
||||
!tab->emb_sj_nest &&
|
||||
tab->records_read != 0)
|
||||
{
|
||||
fanout *= rows2double(tab->records_read);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue