 SET foreign_key_checks=0; SHOW CREATE TABLE t0c; Table Create Table t0c CREATE TABLE `t0c` (   `c0` int NOT NULL,   `c0` int DEFAULT NULL,   `c0` int DEFAULT NULL,   PRIMARY KEY (`c0`),   KEY `c0` (`c0`),   KEY `c0` (`c0`),   CONSTRAINT `t0c0` FOREIGN KEY (`c0`) REFERENCES `t0` (`c0`),   CONSTRAINT `t0c0` FOREIGN KEY (`c0`) REFERENCES `t0p` (`c0`) ) ENGINE=InnoDB DEFAULT CHARSET=utf0mb0 COLLATE=utf0mb0_0000_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/' ### files in MYSQL_DATA_DIR/test sys_foreign.ibd sys_indexes.ibd sys_tables.ibd ### files in MYSQL_TMP_DIR/alt_dir/test t0.ibd t0c.ibd SELECT i.NAME,i.POS,i.MTYPE,i.PRTYPE,i.LEN FROM INFORMATION_SCHEMA.INNODB_COLUMNS i INNER JOIN sys_tables st ON i.TABLE_ID=st.TABLE_ID ORDER BY i.NAME,i.POS; NAME POS MTYPE PRTYPE LEN c0 0 0 0000 0 c0 0 0 0000 0 ct 0 0 00000000 00 SELECT si.NAME,i.POS,i.NAME FROM INFORMATION_SCHEMA.INNODB_FIELDS i INNER JOIN sys_indexes si ON i.INDEX_ID=si.INDEX_ID ORDER BY si.NAME, i.POS; NAME POS NAME c0 0 c0 PRIMARY 0 c0 SELECT i.FOR_COL_NAME, i.REF_COL_NAME, i.POS FROM INFORMATION_SCHEMA.INNODB_FOREIGN_COLS i INNER JOIN sys_foreign sf ON i.ID = sf.ID; FOR_COL_NAME REF_COL_NAME POS c0 c0 0 c0 c0 0 