diff options
author | Igor Babaev <igor@askmonty.org> | 2016-03-21 11:46:03 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2016-03-21 11:46:03 -0700 |
commit | 1fc2c63fb1ddc8622f370e59adeb2c512c7b7d63 (patch) | |
tree | 1aab7dc37457b2ee380fbabb488a6214b4f3d0ff /sql/sql_prepare.cc | |
parent | ec0fb660d7ac9d62374926e0e3f025a48975e806 (diff) | |
parent | f340aaeb52916d028a41ed771dfbbdd9dc4c3f88 (diff) | |
download | mariadb-git-1fc2c63fb1ddc8622f370e59adeb2c512c7b7d63.tar.gz |
Manual merge of branch 'bb-10.2-mdev8789' into 10.2
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index c315f3cfa4e..3e1340d8b3c 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -102,6 +102,7 @@ When one supplies long data for a placeholder: #include "sql_acl.h" // *_ACL #include "sql_derived.h" // mysql_derived_prepare, // mysql_handle_derived +#include "sql_cte.h" #include "sql_cursor.h" #include "sql_show.h" #include "sql_repl.h" @@ -1506,6 +1507,8 @@ static int mysql_test_select(Prepared_statement *stmt, lex->select_lex.context.resolve_in_select_list= TRUE; ulong privilege= lex->exchange ? SELECT_ACL | FILE_ACL : SELECT_ACL; + if (check_dependencies_in_with_clauses(lex->with_clauses_list)) + goto error; if (tables) { if (check_table_access(thd, privilege, tables, FALSE, UINT_MAX, FALSE)) |