1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-25 13:42:52 +03:00
mariadb/mysql-test/suite/innodb/t/create_isl_with_direct.test
Marko Mäkelä c1d7b4575e 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 ignore the DATA DIRECTORY attribute even though
the server was started with --skip-symbolic-links.

Native ALTER TABLE in InnoDB will retain the DATA DIRECTORY attribute
of the table, no matter if the table will be rebuilt or not.

Generic ALTER TABLE (with ALGORITHM=COPY) as well as TRUNCATE TABLE
will discard the DATA DIRECTORY attribute.

All tests have been run with and without the ./mtr option
--mysqld=--skip-symbolic-links
and some tests that use the InnoDB DATA DIRECTORY attribute
have been adjusted for this.
2022-01-21 14:43:59 +02:00

28 lines
850 B
Plaintext

--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/have_symlink.inc
--disable_query_log
CALL mtr.add_suppression(".*Failed to set O_DIRECT on file.*");
# The below mtr suppression to avoid failure in solaris platform.
CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to set DIRECTIO_ON on file.*");
--enable_query_log
SHOW VARIABLES LIKE 'innodb_flush_method';
let MYSQLD_DATADIR=`SELECT @@datadir`;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
# Create a table with explicit data directory option.
EVAL CREATE TABLE t1 (x INT) ENGINE=INNODB, DATA DIRECTORY='$MYSQL_TMP_DIR';
--echo # Contents of tmp/test directory containing .ibd file
--list_files $MYSQL_TMP_DIR/test
--echo # Contents of the 'test' database directory containing .isl and .frm files
--list_files $MYSQLD_DATADIR/test
DROP TABLE t1;