summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-04-10 08:28:13 +0200
committerSergei Golubchik <sergii@pisem.net>2012-04-10 08:28:13 +0200
commit16c5c53fc21b162844c38a87ac48205448ca1d2f (patch)
tree7a50437d5f9da772ec8aaacab322e5f6c13e7305 /sql/sql_view.cc
parentf860b2aad41cd1b5ed0438ea211dcd78eec82b94 (diff)
parented418461614d912fbb114053508b3fb09b1fc2f0 (diff)
downloadmariadb-git-16c5c53fc21b162844c38a87ac48205448ca1d2f.tar.gz
mysql 5.5.23 merge
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;