Skip to content

Commit e20e28b

Browse files
committed
Fix for the previous cset: make first_explain_order_tab handle degenerate joins
1 parent a2f245e commit e20e28b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/sql_select.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8365,6 +8365,8 @@ JOIN_TAB *first_explain_order_tab(JOIN* join)
83658365
{
83668366
JOIN_TAB* tab;
83678367
tab= join->join_tab;
8368+
if (!tab)
8369+
return NULL; /* Can happen when when the tables were optimized away */
83688370
return (tab->bush_children) ? tab->bush_children->start : tab;
83698371
}
83708372

0 commit comments

Comments
 (0)