1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

BUG#25677 - With --skip-symbolic-links option on, DATA DIRECTORY

clause is silently ignored

When symbolic links are disabled by command line option or
NO_DIR_IN_CREATE sql mode, CREATE TABLE silently ignores
DATA/INDEX DIRECTORY options.

With this fix a warning is issued when symbolic links are disabled.


mysql-test/r/symlink.result:
  A test case for BUG#25677.
mysql-test/t/symlink.test:
  A test case for BUG#25677.
sql/sql_parse.cc:
  Moved handling of situation when mysqld is compiled without
  HAVE_READLINK to mysql_create_table_no_lock().
sql/sql_table.cc:
  Issue a warning in case DATA/INDEX DIRECTORY is specified and:
  - server is compiled without HAVE_READLINK;
  - using symbolic links is disabled by command line option;
  - using symbolic links is disabled by NO_DIR_IN_CREATE sql mode.
This commit is contained in:
unknown
2007-12-07 17:40:42 +04:00
parent b9ecec8622
commit 510bda4bed
6 changed files with 105 additions and 10 deletions

View File

@ -2237,15 +2237,7 @@ mysql_execute_command(THD *thd)
/* Might have been updated in create_table_precheck */
create_info.alias= create_table->alias;
#ifndef HAVE_READLINK
if (create_info.data_file_name)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
"DATA DIRECTORY option ignored");
if (create_info.index_file_name)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
"INDEX DIRECTORY option ignored");
create_info.data_file_name= create_info.index_file_name= NULL;
#else
#ifdef HAVE_READLINK
/* Fix names if symlinked tables */
if (append_file_to_dir(thd, &create_info.data_file_name,
create_table->table_name) ||