mariadb/mysql-test/suite/innodb/r/skip_symbolic_links.result
Sergei Golubchik 1a85ae444a MDEV-36050 DATA/INDEX DIRECTORY handling is inconsistent
consistently issue a

Note 1618 DATA DIRECTORY option ignored
Note 1618 INDEX DIRECTORY option ignored

in archive/csv/innodb/rocksdb whenever an option is ignored.

Note that csv doesn't say "INDEX DIRECTORY option ignored"
because it does not create index files at all anywhere.

Other engines don't say "INDEX DIRECTORY option ignored"
if the table has no indexes.

additionally InnoDB doesn't say that if INDEX DIRECTORY is
the same as DATA DIRECTORY, because in that case indexes are
technically stored in INDEX DIRECTORY.

collateral fix: use strmake to zero-terminate the string
2025-04-18 09:41:23 +02:00

56 lines
1.8 KiB
Text

SELECT @@have_symlink;
@@have_symlink
DISABLED
CREATE TABLE t1(a INT, KEY(a)) ENGINE=InnoDB DATA DIRECTORY '$MYSQL_TMP_DIR' INDEX DIRECTORY '$MYSQL_TMP_DIR';
Warnings:
Warning 1618 DATA DIRECTORY option ignored
Note 1618 INDEX DIRECTORY option ignored
DROP TABLE t1;
CREATE TABLE t1(a INT, KEY(a)) ENGINE=InnoDB;
ALTER TABLE t1 DATA DIRECTORY '$MYSQL_TMP_DIR' INDEX DIRECTORY '$MYSQL_TMP_DIR';
Warnings:
Warning 1618 DATA DIRECTORY option ignored
Warning 1618 INDEX DIRECTORY option ignored
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
KEY `a` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
DROP TABLE t1;
# restart: --symbolic-links
CREATE TABLE t1(a INT PRIMARY KEY, b INT) ENGINE=InnoDB
DATA DIRECTORY '$MYSQL_TMP_DIR' INDEX DIRECTORY '$MYSQL_TMP_DIR/other';
Warnings:
Note 1618 INDEX DIRECTORY option ignored
CREATE TABLE t2(a INT PRIMARY KEY, b INT) ENGINE=InnoDB
DATA DIRECTORY '$MYSQL_TMP_DIR' INDEX DIRECTORY '$MYSQL_TMP_DIR';
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
# restart
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
ALTER TABLE t2 FORCE, ALGORITHM=COPY;
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
t1.ibd
t2.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;