summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-12-25 09:13:28 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-12-25 09:13:28 +0100
commit478b83032b170b2ae030fa77fe4bed60a7910472 (patch)
treea3893bb725e227dc15c6997731cdeba622ae1744 /sql/sql_view.cc
parent0aa02567dd62d96467f84ba96cc67b103f63c9e0 (diff)
parent043bd85a574a88856ab9c6d497e682ed06fe45e9 (diff)
downloadmariadb-git-478b83032b170b2ae030fa77fe4bed60a7910472.tar.gz
Merge branch '10.3' into 10.4bb-10.4-MDEV-23468
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 0a18a852832..126db90656c 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -292,6 +292,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,