Fix for the previous cset: make first_explain_order_tab handle degenerate joins

This commit is contained in:
Sergei Petrunia 2016-08-10 01:13:09 +03:00
commit e20e28bd2e

View file

@ -8365,6 +8365,8 @@ JOIN_TAB *first_explain_order_tab(JOIN* join)
{
JOIN_TAB* tab;
tab= join->join_tab;
if (!tab)
return NULL; /* Can happen when when the tables were optimized away */
return (tab->bush_children) ? tab->bush_children->start : tab;
}