diff options
author | Igor Babaev <igor@askmonty.org> | 2018-01-18 15:56:28 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-01-18 15:56:28 -0800 |
commit | 30289a2713807dbca9b2560634379a5bd9ea86e8 (patch) | |
tree | 9d9ef41d07d141c0bd3ff2f900a9fb779c663671 /sql/item_subselect.cc | |
parent | 6c09a6542e94d2bcaaa7d03abe6b6cab40083f99 (diff) | |
download | mariadb-git-30289a2713807dbca9b2560634379a5bd9ea86e8.tar.gz |
Fixed mdev-14969 Non-recursive Common Table Expressions used in view
caused an error
The function subselect_single_select_engine::print() did not print
the WITH clause attached to a subselect with single select engine.
As a result views using suqueries with attached WITH clauses lost
these clauses when saved in frm files.
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 96d3bea6685..74f11ca6e41 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -4373,6 +4373,9 @@ table_map subselect_union_engine::upper_select_const_tables() void subselect_single_select_engine::print(String *str, enum_query_type query_type) { + With_clause* with_clause= select_lex->get_with_clause(); + if (with_clause) + with_clause->print(str, query_type); select_lex->print(get_thd(), str, query_type); } |