summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 0db69af094f..b6a7cf010ed 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -445,6 +445,13 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
view= lex->unlink_first_table(&link_to_local);
+ if (check_db_dir_existence(view->db))
+ {
+ my_error(ER_BAD_DB_ERROR, MYF(0), view->db);
+ res= TRUE;
+ goto err;
+ }
+
if (mode == VIEW_ALTER && fill_defined_view_parts(thd, view))
{
res= TRUE;