summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-12-23 19:28:02 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-12-23 19:28:02 +0100
commit25561435e0b1fe42ec29d5ab06dc15875cdd1cfa (patch)
treed2e67d4509577d84da7ade2820154c904180e151 /sql/sql_view.cc
parentfa1aef39ebc7d84d24d4e3d2124f982526632ee9 (diff)
parent8d8370e31d48e0bc6139c18770746f9959c21598 (diff)
downloadmariadb-git-25561435e0b1fe42ec29d5ab06dc15875cdd1cfa.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 5ffa9936098..271e018d2ab 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -291,6 +291,8 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view,
{
for (tbl= sl->get_table_list(); tbl; tbl= tbl->next_local)
{
+ if (!tbl->with && tbl->select_lex)
+ tbl->with= tbl->select_lex->find_table_def_in_with_clauses(tbl);
/*
Ensure that we have some privileges on this table, more strict check
will be done on column level after preparation,