1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
Marko Mäkelä
2022-01-21 14:43:59 +02:00
parent fa7a67ff49
commit c1d7b4575e
19 changed files with 133 additions and 13 deletions

View File

@@ -0,0 +1,54 @@
SELECT @@have_symlink;
@@have_symlink
DISABLED
CREATE TABLE t1(a INT) ENGINE=InnoDB DATA DIRECTORY 'MYSQL_TMP_DIR';
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
DROP TABLE t1;
CREATE TABLE t1(a INT) ENGINE=InnoDB;
ALTER TABLE t1 DATA DIRECTORY 'MYSQL_TMP_DIR';
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1(a INT PRIMARY KEY, b INT) ENGINE=InnoDB
DATA DIRECTORY 'MYSQL_TMP_DIR';
CREATE TABLE t2(a INT PRIMARY KEY, b INT) ENGINE=InnoDB
DATA DIRECTORY 'MYSQL_TMP_DIR';
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
ALTER TABLE t2 FORCE, ALGORITHM=COPY;
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
test.t1 optimize status OK
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
t1.ibd
DROP TABLE t2;
RENAME TABLE t1 TO t2;
ALTER TABLE t2 ADD UNIQUE INDEX(b), RENAME TO t3;
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
ALTER TABLE t3 RENAME TO t2;
ALTER TABLE t2 DROP INDEX b, RENAME TO t1;
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
ALTER TABLE t1 CHANGE b c INT;
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
ALTER TABLE t1 CHANGE c b INT NOT NULL;
Warnings:
Warning 1618 <DATA DIRECTORY> option ignored
t1.ibd
TRUNCATE TABLE t1;
DROP TABLE t1;