diff options
author | Igor Babaev <igor@askmonty.org> | 2017-01-18 21:03:01 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2017-01-18 21:03:01 -0800 |
commit | 833aa97cec771fbfb2ef8dd104de6a3d1e971daa (patch) | |
tree | 3d011700736073169f9702fb982339a96f723ec8 /sql/sql_cte.cc | |
parent | a1315a650a69745bac7166cfe1423215dfaac6e1 (diff) | |
download | mariadb-git-833aa97cec771fbfb2ef8dd104de6a3d1e971daa.tar.gz |
Fixed bug mdev-11818.
When a query containing a WITH clause is printed by EXPLAIN
EXTENDED command there should not be any data expansion in
the query specifications of the WITH elements of this WITH
clause.
Diffstat (limited to 'sql/sql_cte.cc')
-rw-r--r-- | sql/sql_cte.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc index a4ceae52e5e..42cc20647a4 100644 --- a/sql/sql_cte.cc +++ b/sql/sql_cte.cc @@ -1246,6 +1246,12 @@ bool st_select_lex::check_subqueries_with_recursive_references() void With_clause::print(String *str, enum_query_type query_type) { + /* + Any with clause contains just definitions of CTE tables. + No data expansion is applied to these definitions. + */ + query_type= (enum_query_type) (query_type | QT_NO_DATA_EXPANSION); + str->append(STRING_WITH_LEN("with ")); if (with_recursive) str->append(STRING_WITH_LEN("recursive ")); |