diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2017-09-07 11:13:08 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2017-09-07 11:13:08 +0200 |
commit | 0e931867fd540123679f8af7da0ddf9bd351d546 (patch) | |
tree | 09aeeb20545cac731a8764879d3ee98c97d841c1 /sql/sql_prepare.cc | |
parent | 2b387855df7be57a3017a5c211543574fa4364d4 (diff) | |
download | mariadb-git-bb-10.2-MDEV-13436.tar.gz |
MDEV-13436 PREPARE doesn't work as expected & throws errors but MySQL is working finebb-10.2-MDEV-13436
Now we allow derived in the from clause of subqueries so set
flag which prevent optimisation of subqueries during view
creation before derived processing so subquery will be
correctly printed in the view .frm.
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index f9da7e530cb..c8ebbb08f15 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2097,11 +2097,11 @@ static bool mysql_test_create_view(Prepared_statement *stmt) if (thd->open_temporary_tables(tables)) goto err; + lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VIEW; if (open_normal_and_derived_tables(thd, tables, MYSQL_OPEN_FORCE_SHARED_MDL, DT_PREPARE)) goto err; - lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_VIEW; res= select_like_stmt_test(stmt, 0, 0); err: |