maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #13070
Re: 673ea509e2c: MDEV-26870 --skip-symbolic-links does not disallow .isl file creation
Hi, Marko,
On Jan 20, Marko Mäkelä wrote:
> revision-id: 673ea509e2c (mariadb-10.2.40-230-g673ea509e2c)
> parent(s): d28d3aee108
> author: Marko Mäkelä
> committer: Marko Mäkelä
> timestamp: 2022-01-20 16:13:08 +0200
> message:
>
> MDEV-26870 --skip-symbolic-links does not disallow .isl file creation
>
> The InnoDB DATA DIRECTORY attribute is not implemented via
> symbolic links but something similar, *.isl files that contain
> the names of data files.
>
> InnoDB failed to reject the DATA DIRECTORY attribute even though
> the server was started with --skip-symbolic-links.
>
> Because TRUNCATE TABLE cannot easily return an error, it will keep
> rebuilding tables even if they carry the DATA DIRECTORY attribute.
>
> diff --git a/mysql-test/suite/encryption/t/innodb-first-page-read.test b/mysql-test/suite/encryption/t/innodb-first-page-read.test
> index d661e4565d2..a0b3ca3f0ff 100644
> --- a/mysql-test/suite/encryption/t/innodb-first-page-read.test
> +++ b/mysql-test/suite/encryption/t/innodb-first-page-read.test
> @@ -1,6 +1,7 @@
> -- source include/have_innodb.inc
> -- source include/have_file_key_management_plugin.inc
> -- source include/not_embedded.inc
> +-- source include/have_symlink.inc
when can have_symlink be false?
Why InnoDB tests depend on server's symlink support?
InnoDB does not use symlinks, it uses isl files.
> --disable_warnings
> SET GLOBAL innodb_file_format = `Barracuda`;
> diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
> index 5d78e64a06b..a8b16ba1eb0 100644
> --- a/storage/innobase/handler/ha_innodb.cc
> +++ b/storage/innobase/handler/ha_innodb.cc
> @@ -11710,9 +11710,15 @@ create_table_info_t::create_options_are_invalid()
> break;
> }
>
> - if (m_create_info->data_file_name
> - && m_create_info->data_file_name[0] != '\0'
> - && !create_option_data_directory_is_valid()) {
> + if (!m_create_info->data_file_name
> + || !m_create_info->data_file_name[0]) {
> + } else if (!my_use_symdir) {
> + push_warning(
> + m_thd, Sql_condition::WARN_LEVEL_WARN,
> + ER_ILLEGAL_HA_CREATE_OPTION,
> + "InnoDB: DATA DIRECTORY requires HAVE_SYMLINK.");
> + ret = "DATA DIRECTORY";
MyISAM does
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
WARN_OPTION_IGNORED,
ER_THD(thd, WARN_OPTION_IGNORED),
"DATA DIRECTORY");
Archive does
if (create_info->data_file_name)
my_error(WARN_OPTION_IGNORED, MYF(ME_WARNING), "DATA DIRECTORY");
I suggest you do one of the above too.
> + } else if (!create_option_data_directory_is_valid()) {
> ret = "DATA DIRECTORY";
> }
>
Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx
Follow ups