1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-10729: Server crashes in st_select_lex::set_explain_type

Make the new (CTE-related) code in set_explain_type to take into
account that some JOIN_TABs are non-merged semi-joins, and do not
have a TABLE object.
This commit is contained in:
Sergei Petrunia
2016-09-07 17:09:29 +03:00
parent a032fd5c1c
commit 95b8dcbd43
3 changed files with 34 additions and 1 deletions

View File

@@ -4370,7 +4370,7 @@ void st_select_lex::set_explain_type(bool on_the_fly)
for (JOIN_TAB *tab= first_explain_order_tab(join); tab;
tab= next_explain_order_tab(join, tab))
{
if (tab->table->pos_in_table_list->with)
if (tab->table && tab->table->pos_in_table_list->with)
{
uses_cte= true;
break;