diff options
author | Igor Babaev <igor@askmonty.org> | 2020-12-28 21:20:13 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2020-12-28 21:20:32 -0800 |
commit | e59c1cef3bc4016f9fa9d7a0f6935463b7283a58 (patch) | |
tree | 865f9ea5f6488f6dec6be51de69fbd5f130aabc4 /sql/sql_lex.cc | |
parent | 7f037b8c9f38b11a8c5038763cea273ff7fc8136 (diff) | |
download | mariadb-git-e59c1cef3bc4016f9fa9d7a0f6935463b7283a58.tar.gz |
Correction of the merge 10.2 into 10.3 for MDEV-23619
(correction for commit 6fed6de93f120b5e311b79892e7865639e9613a4)
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index dc0662e11b8..6116dee6e7e 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -4712,14 +4712,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) |