summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-05-24 09:38:49 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-05-24 09:38:49 +0300
commit1864a8ea93aa1d1a540c83526a25df2ad0330763 (patch)
treef6d1ae8e9e696ea8537a395d061f697e5bccd4aa /sql/sql_view.cc
parentb01a9fd817d9d8e5941008d6981338eaa7369c83 (diff)
parent5c75ba9cadc7877e91d6b712f157ff5623c09c60 (diff)
downloadmariadb-git-1864a8ea93aa1d1a540c83526a25df2ad0330763.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 271e018d2ab..8b398bf3996 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -431,12 +431,6 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
lex->link_first_table_back(view, link_to_local);
view->open_type= OT_BASE_ONLY;
- if (check_dependencies_in_with_clauses(lex->with_clauses_list))
- {
- res= TRUE;
- goto err;
- }
-
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
/*
@@ -890,6 +884,13 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
LEX *lex= thd->lex;
/*
+ Ensure character set number != 17 (character set = filename) and mbminlen=1
+ because these character sets are not parser friendly, which can give weird
+ sequence in .frm file of view and later give parsing error.
+ */
+ DBUG_ASSERT(thd->charset()->mbminlen == 1 && thd->charset()->number != 17);
+
+ /*
View definition query -- a SELECT statement that fully defines view. It
is generated from the Item-tree built from the original (specified by
the user) query. The idea is that generated query should eliminates all
@@ -1411,9 +1412,6 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
TABLE_LIST *tbl;
Security_context *security_ctx= 0;
- if (check_dependencies_in_with_clauses(thd->lex->with_clauses_list))
- goto err;
-
/*
Check rights to run commands (ANALYZE SELECT, EXPLAIN SELECT &
SHOW CREATE) which show underlying tables.