diff options
author | Igor Babaev <igor@askmonty.org> | 2017-03-24 22:04:19 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2017-03-26 23:00:28 -0700 |
commit | 5a4537f09296a1c6151c8dfc35ecad7584aa55c4 (patch) | |
tree | 70a769c38fea710dd8896ef8eafa85510364e3e7 /sql/sql_cte.cc | |
parent | b56262f69677fdb158b3d19dd8848e5802b2dd27 (diff) | |
download | mariadb-git-5a4537f09296a1c6151c8dfc35ecad7584aa55c4.tar.gz |
Fixed bug mdev-12360.
The method With_element::check_unrestricted_recursive() icorrectly performed
the check that no recursive reference is not encountered in inner parts of
outer joins. As a result the server reported errors for valid specifications
with outer joins.
Diffstat (limited to 'sql/sql_cte.cc')
-rw-r--r-- | sql/sql_cte.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc index 3011b510761..1dded86c824 100644 --- a/sql/sql_cte.cc +++ b/sql/sql_cte.cc @@ -1168,6 +1168,8 @@ bool With_element::check_unrestricted_recursive(st_select_lex *sel, ti.rewind(); while ((tbl= ti++)) { + if (!tbl->is_with_table_recursive_reference()) + continue; for (TABLE_LIST *tab= tbl; tab; tab= tab->embedding) { if (tab->outer_join & (JOIN_TYPE_LEFT | JOIN_TYPE_RIGHT)) |