summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <istruewing@stella.local>2008-03-14 14:03:47 +0100
committerunknown <istruewing@stella.local>2008-03-14 14:03:47 +0100
commit9fa2d50559383785c72656dcdffa878cc3563da9 (patch)
treeeff22a0b56e730c1e0946113822a7f9daba4f096 /sql/sql_table.cc
parente79249f81bbb7158fb263455e531bda4117b5fc9 (diff)
downloadmariadb-git-9fa2d50559383785c72656dcdffa878cc3563da9.tar.gz
Post-merge fix. Moved the symlink handling from sql_parse.cc here.
mysql-test/r/symlink.result: Post-merge fix mysql-test/t/symlink.test: Post-merge fix
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 18d8ae68008..b42045446d3 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -3517,8 +3517,26 @@ bool mysql_create_table_no_lock(THD *thd,
create_info->table_existed= 0; // Mark that table is created
#ifdef HAVE_READLINK
+ if (test_if_data_home_dir(create_info->data_file_name))
+ {
+ my_error(ER_WRONG_ARGUMENTS, MYF(0), "DATA DIRECTORY");
+ goto unlock_and_end;
+ }
+ if (test_if_data_home_dir(create_info->index_file_name))
+ {
+ my_error(ER_WRONG_ARGUMENTS, MYF(0), "INDEX DIRECTORY");
+ goto unlock_and_end;
+ }
+
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (check_partition_dirs(thd->lex->part_info))
+ {
+ goto unlock_and_end;
+ }
+#endif /* WITH_PARTITION_STORAGE_ENGINE */
+
if (!my_use_symdir || (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE))
-#endif
+#endif /* HAVE_READLINK */
{
if (create_info->data_file_name)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,