summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2014-03-23 17:00:29 +0200
committerMichael Widenius <monty@askmonty.org>2014-03-23 17:00:29 +0200
commit39e6083e35459c9c8b22d37aaa2b74545884c7b0 (patch)
treed2173f06d0676cf55be448632ceae58f18a2ff56 /storage/myisam
parent6214f4e51ccfc2c8cbb82549559e61f4a436996b (diff)
downloadmariadb-git-39e6083e35459c9c8b22d37aaa2b74545884c7b0.tar.gz
MDEV-5818: MySQL WL#6145: Separate the dependence of DATA DIRECTORY from symbolic links
Copied relevant test cases and code from the MySQL 5.6 tree Testing of my_use_symdir moved to engines. mysql-test/r/partition_windows.result: Updated result file mysql-test/suite/archive/archive_no_symlink-master.opt: Testing of symlinks with archive mysql-test/suite/archive/archive_no_symlink.result: Testing of symlinks with archive mysql-test/suite/archive/archive_no_symlink.test: Testing of symlinks with archive mysql-test/suite/archive/archive_symlink.result: Testing of symlinks with archive mysql-test/suite/archive/archive_symlink.test: Testing of symlinks with archive sql/log_event.cc: Updated comment sql/partition_info.cc: Don't test my_use_symdir here sql/sql_parse.cc: Updated comment sql/sql_table.cc: Don't test my_use_symdir here sql/table.cc: Added more DBUG_PRINT storage/archive/ha_archive.cc: Give warnings for index_file_name and if we can't use data directory storage/myisam/ha_myisam.cc: Give warnings if we can't use data directory or index directory
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/ha_myisam.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 18f0c3b7f60..c997f03463a 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -2006,10 +2006,27 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
(ulonglong) 0);
create_info.data_file_length= ((ulonglong) share->max_rows *
share->avg_row_length);
- create_info.data_file_name= ha_create_info->data_file_name;
- create_info.index_file_name= ha_create_info->index_file_name;
create_info.language= share->table_charset->number;
+#ifdef HAVE_READLINK
+ if (my_use_symdir)
+ {
+ create_info.data_file_name= ha_create_info->data_file_name;
+ create_info.index_file_name= ha_create_info->index_file_name;
+ }
+ else
+#endif /* HAVE_READLINK */
+ {
+ if (ha_create_info->data_file_name)
+ push_warning_printf(table_arg->in_use, Sql_condition::WARN_LEVEL_WARN,
+ WARN_OPTION_IGNORED, ER(WARN_OPTION_IGNORED),
+ "DATA DIRECTORY");
+ if (ha_create_info->index_file_name)
+ push_warning_printf(table_arg->in_use, Sql_condition::WARN_LEVEL_WARN,
+ WARN_OPTION_IGNORED, ER(WARN_OPTION_IGNORED),
+ "INDEX DIRECTORY");
+ }
+
if (ha_create_info->tmp_table())
create_flags|= HA_CREATE_TMP_TABLE | HA_CREATE_DELAY_KEY_WRITE;
if (ha_create_info->options & HA_CREATE_KEEP_FILES)