summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-12-29 14:32:58 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-12-29 14:32:58 +0100
commit3454b5cf35a61e8f6cfab376638520dee4a50609 (patch)
tree938ade6b1e3526a5d2b008a2189604e00a578ba9 /sql/sql_lex.cc
parent4601e6e565dacd074e211108acf48c067f951b4f (diff)
parente59c1cef3bc4016f9fa9d7a0f6935463b7283a58 (diff)
downloadmariadb-git-3454b5cf35a61e8f6cfab376638520dee4a50609.tar.gz
Merge branch '10.3' into 10.4
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 10cd20e1207..e196765b6bc 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4831,14 +4831,14 @@ void st_select_lex::set_explain_type(bool on_the_fly)
/*
pos_in_table_list=NULL for e.g. post-join aggregation JOIN_TABs.
*/
- if (!tab->table);
- else if (const TABLE_LIST *pos= tab->table->pos_in_table_list)
+ if (!(tab->table && tab->table->pos_in_table_list))
+ continue;
+ TABLE_LIST *tbl= tab->table->pos_in_table_list;
+ if (tbl->with && tbl->with->is_recursive &&
+ tbl->is_with_table_recursive_reference())
{
- if (pos->with && pos->with->is_recursive)
- {
- uses_cte= true;
- break;
- }
+ uses_cte= true;
+ break;
}
}
if (uses_cte)