| 1 |
# |
| 2 |
# Show what happens when --innodb-directories is modified |
| 3 |
# to ignore previously known directories. |
| 4 |
# |
| 5 |
SET default_storage_engine=InnoDB; |
| 6 |
# Restart the engine to make the remote directory known. |
| 7 |
# restart: --innodb-directories=MYSQL_TMP_DIR/remote_dir |
| 8 |
# |
| 9 |
# Create two tables in a known remote directory. |
| 10 |
# |
| 11 |
CREATE TABLE t1(c1 INT) DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir'; |
| 12 |
SHOW CREATE TABLE t1; |
| 13 |
Table Create Table |
| 14 |
t1 CREATE TABLE `t1` ( |
| 15 |
`c1` int DEFAULT NULL |
| 16 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir/' |
| 17 |
CREATE TABLE t2(c1 INT, c2 INT) DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir'; |
| 18 |
SHOW CREATE TABLE t2; |
| 19 |
Table Create Table |
| 20 |
t2 CREATE TABLE `t2` ( |
| 21 |
`c1` int DEFAULT NULL, |
| 22 |
`c2` int DEFAULT NULL |
| 23 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir/' |
| 24 |
# |
| 25 |
# Create a general tablespace in a known remote directory. |
| 26 |
# |
| 27 |
CREATE TABLESPACE ts1 ADD DATAFILE 'MYSQL_TMP_DIR/remote_dir/ts1.ibd'; |
| 28 |
# |
| 29 |
# Create a table with a partitions in a known remote directory. |
| 30 |
# |
| 31 |
CREATE TABLE tp1(c1 INT) |
| 32 |
PARTITION BY HASH(c1) ( |
| 33 |
PARTITION p1 DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir', |
| 34 |
PARTITION p2 DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir'); |
| 35 |
SHOW CREATE TABLE tp1; |
| 36 |
Table Create Table |
| 37 |
tp1 CREATE TABLE `tp1` ( |
| 38 |
`c1` int DEFAULT NULL |
| 39 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 40 |
/*!50100 PARTITION BY HASH (`c1`) |
| 41 |
(PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir/' ENGINE = InnoDB, |
| 42 |
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir/' ENGINE = InnoDB) */ |
| 43 |
# |
| 44 |
# Create a table with a sub-partitions in a known remote directory. |
| 45 |
# |
| 46 |
CREATE TABLE tsp1(c1 INT, c2 INT) |
| 47 |
PARTITION BY RANGE(c1) SUBPARTITION BY HASH(c2) ( |
| 48 |
PARTITION p1 VALUES LESS THAN (10) ( |
| 49 |
SUBPARTITION s1 DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir', |
| 50 |
SUBPARTITION s2 DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir'), |
| 51 |
PARTITION p2 VALUES LESS THAN (20) ( |
| 52 |
SUBPARTITION s3 DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir', |
| 53 |
SUBPARTITION s4 DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir')); |
| 54 |
SHOW CREATE TABLE tsp1; |
| 55 |
Table Create Table |
| 56 |
tsp1 CREATE TABLE `tsp1` ( |
| 57 |
`c1` int DEFAULT NULL, |
| 58 |
`c2` int DEFAULT NULL |
| 59 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 60 |
/*!50100 PARTITION BY RANGE (`c1`) |
| 61 |
SUBPARTITION BY HASH (`c2`) |
| 62 |
(PARTITION p1 VALUES LESS THAN (10) |
| 63 |
(SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir/' ENGINE = InnoDB, |
| 64 |
SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir/' ENGINE = InnoDB), |
| 65 |
PARTITION p2 VALUES LESS THAN (20) |
| 66 |
(SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir/' ENGINE = InnoDB, |
| 67 |
SUBPARTITION s4 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir/' ENGINE = InnoDB)) */ |
| 68 |
# |
| 69 |
# Create two undo tablespaces in a known remote directory. |
| 70 |
# |
| 71 |
CREATE UNDO TABLESPACE undo_003 ADD DATAFILE 'MYSQL_TMP_DIR/remote_dir/undo_003.ibu'; |
| 72 |
CREATE UNDO TABLESPACE undo_004 ADD DATAFILE 'MYSQL_TMP_DIR/remote_dir/undo_004.ibu'; |
| 73 |
SELECT NAME, SPACE_TYPE, STATE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES |
| 74 |
WHERE NAME LIKE 'undo_0%' ORDER BY NAME; |
| 75 |
NAME SPACE_TYPE STATE |
| 76 |
undo_003 Undo active |
| 77 |
undo_004 Undo active |
| 78 |
# |
| 79 |
# Restart mysqld without the remote directory in --innodb-directories |
| 80 |
# and with one of the undo tablespaces deleted. |
| 81 |
# |
| 82 |
# restart |
| 83 |
# |
| 84 |
# Validate the messages that should have been put into the error log at startup. |
| 85 |
# |
| 86 |
Pattern "The datafile '.*' for tablespace undo_003 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" found |
| 87 |
Pattern "Tablespace .*, name 'undo_004', file '.*undo_004.ibu' is missing" found |
| 88 |
Pattern "Cannot find undo tablespace undo_004 with filename '.*' as indicated by the Data Dictionary. Did you move or delete this tablespace. Any undo logs in it cannot be used" found |
| 89 |
Pattern "The datafile '.*' for tablespace test/t1 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" found |
| 90 |
Pattern "The datafile '.*' for tablespace test/t2 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" found |
| 91 |
Pattern "The datafile '.*' for tablespace ts1 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" found |
| 92 |
Pattern "The datafile '.*' for tablespace test/tp1#p#p1 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" found |
| 93 |
Pattern "The datafile '.*' for tablespace test/tp1#p#p2 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" found |
| 94 |
Pattern "The datafile '.*' for tablespace test/tsp1#p#p1#sp#s1 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" found |
| 95 |
Pattern "The datafile '.*' for tablespace test/tsp1#p#p1#sp#s2 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" found |
| 96 |
Pattern "The datafile '.*' for tablespace test/tsp1#p#p1#sp#s3 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" not found |
| 97 |
Pattern "The datafile '.*' for tablespace test/tsp1#p#p2#sp#s4 is in an unprotected location. This file cannot be recovered after a crash until this location is added to innodb_directories" found |
| 98 |
# |
| 99 |
# Show the tablespaces |
| 100 |
# |
| 101 |
SHOW CREATE TABLE t1; |
| 102 |
Table Create Table |
| 103 |
t1 CREATE TABLE `t1` ( |
| 104 |
`c1` int DEFAULT NULL |
| 105 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir/' |
| 106 |
SHOW CREATE TABLE t2; |
| 107 |
Table Create Table |
| 108 |
t2 CREATE TABLE `t2` ( |
| 109 |
`c1` int DEFAULT NULL, |
| 110 |
`c2` int DEFAULT NULL |
| 111 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir/' |
| 112 |
SHOW CREATE TABLE tp1; |
| 113 |
Table Create Table |
| 114 |
tp1 CREATE TABLE `tp1` ( |
| 115 |
`c1` int DEFAULT NULL |
| 116 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 117 |
/*!50100 PARTITION BY HASH (`c1`) |
| 118 |
(PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB, |
| 119 |
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB) */ |
| 120 |
SHOW CREATE TABLE tsp1; |
| 121 |
Table Create Table |
| 122 |
tsp1 CREATE TABLE `tsp1` ( |
| 123 |
`c1` int DEFAULT NULL, |
| 124 |
`c2` int DEFAULT NULL |
| 125 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 126 |
/*!50100 PARTITION BY RANGE (`c1`) |
| 127 |
SUBPARTITION BY HASH (`c2`) |
| 128 |
(PARTITION p1 VALUES LESS THAN (10) |
| 129 |
(SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB, |
| 130 |
SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB), |
| 131 |
PARTITION p2 VALUES LESS THAN (20) |
| 132 |
(SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB, |
| 133 |
SUBPARTITION s4 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB)) */ |
| 134 |
=== information_schema.innodb_tablespaces and innodb_datafiles === |
| 135 |
Space_Name Space_Type Page_Size Zip_Size BlockSize!=0 FileSize!=0 Formats_Permitted Path |
| 136 |
mtr/asserted_test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 137 |
mtr/global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 138 |
mtr/test_ignored_global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 139 |
mtr/test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 140 |
test/t1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/t1.ibd |
| 141 |
test/t2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/t2.ibd |
| 142 |
test/tp1#p#p1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tp1#p#p1.ibd |
| 143 |
test/tp1#p#p2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 144 |
test/tsp1#p#p1#sp#s1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 145 |
test/tsp1#p#p1#sp#s2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s2.ibd |
| 146 |
test/tsp1#p#p2#sp#s3 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 147 |
test/tsp1#p#p2#sp#s4 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s4.ibd |
| 148 |
ts1 General DEFAULT 0 1 1 Any MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 149 |
=== information_schema.files === |
| 150 |
Space_Name File_Type Engine Status Tablespace_Name Path |
| 151 |
mtr/asserted_test_suppressions TABLESPACE InnoDB NORMAL mtr/asserted_test_suppressions MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 152 |
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 153 |
mtr/test_ignored_global_suppressions TABLESPACE InnoDB NORMAL mtr/test_ignored_global_suppressions MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 154 |
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 155 |
test/t1 TABLESPACE InnoDB NORMAL test/t1 MYSQL_TMP_DIR/remote_dir/test/t1.ibd |
| 156 |
test/t2 TABLESPACE InnoDB NORMAL test/t2 MYSQL_TMP_DIR/remote_dir/test/t2.ibd |
| 157 |
test/tp1#p#p1 TABLESPACE InnoDB NORMAL test/tp1#p#p1 MYSQL_TMP_DIR/remote_dir/test/tp1#p#p1.ibd |
| 158 |
test/tp1#p#p2 TABLESPACE InnoDB NORMAL test/tp1#p#p2 MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 159 |
test/tsp1#p#p1#sp#s1 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s1 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 160 |
test/tsp1#p#p1#sp#s2 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s2 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s2.ibd |
| 161 |
test/tsp1#p#p2#sp#s3 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s3 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 162 |
test/tsp1#p#p2#sp#s4 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s4 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s4.ibd |
| 163 |
ts1 TABLESPACE InnoDB NORMAL ts1 MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 164 |
# |
| 165 |
# If implicit tablespaces that exist in unknown locations are |
| 166 |
# part of a TRUNCATE statement, they will be recreated in |
| 167 |
# the default datadir location with a warning put into the error log. |
| 168 |
# |
| 169 |
TRUNCATE TABLE t1; |
| 170 |
Warnings: |
| 171 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 172 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 173 |
SHOW WARNINGS; |
| 174 |
Level Code Message |
| 175 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 176 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 177 |
SHOW CREATE TABLE t1; |
| 178 |
Table Create Table |
| 179 |
t1 CREATE TABLE `t1` ( |
| 180 |
`c1` int DEFAULT NULL |
| 181 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 182 |
TRUNCATE TABLE t2; |
| 183 |
Warnings: |
| 184 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 185 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 186 |
SHOW WARNINGS; |
| 187 |
Level Code Message |
| 188 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 189 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 190 |
SHOW CREATE TABLE t1; |
| 191 |
Table Create Table |
| 192 |
t1 CREATE TABLE `t1` ( |
| 193 |
`c1` int DEFAULT NULL |
| 194 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 195 |
=== information_schema.innodb_tablespaces and innodb_datafiles === |
| 196 |
Space_Name Space_Type Page_Size Zip_Size BlockSize!=0 FileSize!=0 Formats_Permitted Path |
| 197 |
mtr/asserted_test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 198 |
mtr/global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 199 |
mtr/test_ignored_global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 200 |
mtr/test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 201 |
test/t1 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/t1.ibd |
| 202 |
test/t2 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/t2.ibd |
| 203 |
test/tp1#p#p1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tp1#p#p1.ibd |
| 204 |
test/tp1#p#p2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 205 |
test/tsp1#p#p1#sp#s1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 206 |
test/tsp1#p#p1#sp#s2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s2.ibd |
| 207 |
test/tsp1#p#p2#sp#s3 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 208 |
test/tsp1#p#p2#sp#s4 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s4.ibd |
| 209 |
ts1 General DEFAULT 0 1 1 Any MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 210 |
=== information_schema.files === |
| 211 |
Space_Name File_Type Engine Status Tablespace_Name Path |
| 212 |
mtr/asserted_test_suppressions TABLESPACE InnoDB NORMAL mtr/asserted_test_suppressions MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 213 |
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 214 |
mtr/test_ignored_global_suppressions TABLESPACE InnoDB NORMAL mtr/test_ignored_global_suppressions MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 215 |
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 216 |
test/t1 TABLESPACE InnoDB NORMAL test/t1 MYSQLD_DATADIR/test/t1.ibd |
| 217 |
test/t2 TABLESPACE InnoDB NORMAL test/t2 MYSQLD_DATADIR/test/t2.ibd |
| 218 |
test/tp1#p#p1 TABLESPACE InnoDB NORMAL test/tp1#p#p1 MYSQL_TMP_DIR/remote_dir/test/tp1#p#p1.ibd |
| 219 |
test/tp1#p#p2 TABLESPACE InnoDB NORMAL test/tp1#p#p2 MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 220 |
test/tsp1#p#p1#sp#s1 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s1 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 221 |
test/tsp1#p#p1#sp#s2 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s2 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s2.ibd |
| 222 |
test/tsp1#p#p2#sp#s3 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s3 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 223 |
test/tsp1#p#p2#sp#s4 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s4 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s4.ibd |
| 224 |
ts1 TABLESPACE InnoDB NORMAL ts1 MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 225 |
# |
| 226 |
# EXCHANGE PARTITION does not recreate tablespaces, so files in unknown |
| 227 |
# locations will remain there through the exchange. |
| 228 |
# |
| 229 |
ALTER TABLE tp1 EXCHANGE PARTITION p1 WITH TABLE t1; |
| 230 |
SHOW WARNINGS; |
| 231 |
Level Code Message |
| 232 |
SHOW CREATE TABLE t1; |
| 233 |
Table Create Table |
| 234 |
t1 CREATE TABLE `t1` ( |
| 235 |
`c1` int DEFAULT NULL |
| 236 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir/' |
| 237 |
SHOW CREATE TABLE tp1; |
| 238 |
Table Create Table |
| 239 |
tp1 CREATE TABLE `tp1` ( |
| 240 |
`c1` int DEFAULT NULL |
| 241 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 242 |
/*!50100 PARTITION BY HASH (`c1`) |
| 243 |
(PARTITION p1 ENGINE = InnoDB, |
| 244 |
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB) */ |
| 245 |
ALTER TABLE tsp1 EXCHANGE PARTITION s2 WITH TABLE t2; |
| 246 |
SHOW WARNINGS; |
| 247 |
Level Code Message |
| 248 |
SHOW CREATE TABLE t2; |
| 249 |
Table Create Table |
| 250 |
t2 CREATE TABLE `t2` ( |
| 251 |
`c1` int DEFAULT NULL, |
| 252 |
`c2` int DEFAULT NULL |
| 253 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir/' |
| 254 |
SHOW CREATE TABLE tsp1; |
| 255 |
Table Create Table |
| 256 |
tsp1 CREATE TABLE `tsp1` ( |
| 257 |
`c1` int DEFAULT NULL, |
| 258 |
`c2` int DEFAULT NULL |
| 259 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 260 |
/*!50100 PARTITION BY RANGE (`c1`) |
| 261 |
SUBPARTITION BY HASH (`c2`) |
| 262 |
(PARTITION p1 VALUES LESS THAN (10) |
| 263 |
(SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB, |
| 264 |
SUBPARTITION s2 ENGINE = InnoDB), |
| 265 |
PARTITION p2 VALUES LESS THAN (20) |
| 266 |
(SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB, |
| 267 |
SUBPARTITION s4 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB)) */ |
| 268 |
=== information_schema.innodb_tablespaces and innodb_datafiles === |
| 269 |
Space_Name Space_Type Page_Size Zip_Size BlockSize!=0 FileSize!=0 Formats_Permitted Path |
| 270 |
mtr/asserted_test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 271 |
mtr/global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 272 |
mtr/test_ignored_global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 273 |
mtr/test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 274 |
test/t1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/t1.ibd |
| 275 |
test/t2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/t2.ibd |
| 276 |
test/tp1#p#p1 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tp1#p#p1.ibd |
| 277 |
test/tp1#p#p2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 278 |
test/tsp1#p#p1#sp#s1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 279 |
test/tsp1#p#p1#sp#s2 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tsp1#p#p1#sp#s2.ibd |
| 280 |
test/tsp1#p#p2#sp#s3 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 281 |
test/tsp1#p#p2#sp#s4 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s4.ibd |
| 282 |
ts1 General DEFAULT 0 1 1 Any MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 283 |
=== information_schema.files === |
| 284 |
Space_Name File_Type Engine Status Tablespace_Name Path |
| 285 |
mtr/asserted_test_suppressions TABLESPACE InnoDB NORMAL mtr/asserted_test_suppressions MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 286 |
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 287 |
mtr/test_ignored_global_suppressions TABLESPACE InnoDB NORMAL mtr/test_ignored_global_suppressions MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 288 |
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 289 |
test/t1 TABLESPACE InnoDB NORMAL test/t1 MYSQL_TMP_DIR/remote_dir/test/t1.ibd |
| 290 |
test/t2 TABLESPACE InnoDB NORMAL test/t2 MYSQL_TMP_DIR/remote_dir/test/t2.ibd |
| 291 |
test/tp1#p#p1 TABLESPACE InnoDB NORMAL test/tp1#p#p1 MYSQLD_DATADIR/test/tp1#p#p1.ibd |
| 292 |
test/tp1#p#p2 TABLESPACE InnoDB NORMAL test/tp1#p#p2 MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 293 |
test/tsp1#p#p1#sp#s1 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s1 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 294 |
test/tsp1#p#p1#sp#s2 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s2 MYSQLD_DATADIR/test/tsp1#p#p1#sp#s2.ibd |
| 295 |
test/tsp1#p#p2#sp#s3 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s3 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 296 |
test/tsp1#p#p2#sp#s4 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s4 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s4.ibd |
| 297 |
ts1 TABLESPACE InnoDB NORMAL ts1 MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 298 |
TRUNCATE TABLE t2; |
| 299 |
Warnings: |
| 300 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 301 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 302 |
SHOW WARNINGS; |
| 303 |
Level Code Message |
| 304 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 305 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 306 |
SHOW CREATE TABLE t2; |
| 307 |
Table Create Table |
| 308 |
t2 CREATE TABLE `t2` ( |
| 309 |
`c1` int DEFAULT NULL, |
| 310 |
`c2` int DEFAULT NULL |
| 311 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 312 |
=== information_schema.innodb_tablespaces and innodb_datafiles === |
| 313 |
Space_Name Space_Type Page_Size Zip_Size BlockSize!=0 FileSize!=0 Formats_Permitted Path |
| 314 |
mtr/asserted_test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 315 |
mtr/global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 316 |
mtr/test_ignored_global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 317 |
mtr/test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 318 |
test/t1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/t1.ibd |
| 319 |
test/t2 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/t2.ibd |
| 320 |
test/tp1#p#p1 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tp1#p#p1.ibd |
| 321 |
test/tp1#p#p2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 322 |
test/tsp1#p#p1#sp#s1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 323 |
test/tsp1#p#p1#sp#s2 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tsp1#p#p1#sp#s2.ibd |
| 324 |
test/tsp1#p#p2#sp#s3 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 325 |
test/tsp1#p#p2#sp#s4 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s4.ibd |
| 326 |
ts1 General DEFAULT 0 1 1 Any MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 327 |
=== information_schema.files === |
| 328 |
Space_Name File_Type Engine Status Tablespace_Name Path |
| 329 |
mtr/asserted_test_suppressions TABLESPACE InnoDB NORMAL mtr/asserted_test_suppressions MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 330 |
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 331 |
mtr/test_ignored_global_suppressions TABLESPACE InnoDB NORMAL mtr/test_ignored_global_suppressions MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 332 |
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 333 |
test/t1 TABLESPACE InnoDB NORMAL test/t1 MYSQL_TMP_DIR/remote_dir/test/t1.ibd |
| 334 |
test/t2 TABLESPACE InnoDB NORMAL test/t2 MYSQLD_DATADIR/test/t2.ibd |
| 335 |
test/tp1#p#p1 TABLESPACE InnoDB NORMAL test/tp1#p#p1 MYSQLD_DATADIR/test/tp1#p#p1.ibd |
| 336 |
test/tp1#p#p2 TABLESPACE InnoDB NORMAL test/tp1#p#p2 MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 337 |
test/tsp1#p#p1#sp#s1 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s1 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 338 |
test/tsp1#p#p1#sp#s2 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s2 MYSQLD_DATADIR/test/tsp1#p#p1#sp#s2.ibd |
| 339 |
test/tsp1#p#p2#sp#s3 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s3 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 340 |
test/tsp1#p#p2#sp#s4 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s4 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s4.ibd |
| 341 |
ts1 TABLESPACE InnoDB NORMAL ts1 MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 342 |
ALTER TABLE tsp1 EXCHANGE PARTITION s4 WITH TABLE t2; |
| 343 |
SHOW WARNINGS; |
| 344 |
Level Code Message |
| 345 |
SHOW CREATE TABLE t2; |
| 346 |
Table Create Table |
| 347 |
t2 CREATE TABLE `t2` ( |
| 348 |
`c1` int DEFAULT NULL, |
| 349 |
`c2` int DEFAULT NULL |
| 350 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir/' |
| 351 |
SHOW CREATE TABLE tsp1; |
| 352 |
Table Create Table |
| 353 |
tsp1 CREATE TABLE `tsp1` ( |
| 354 |
`c1` int DEFAULT NULL, |
| 355 |
`c2` int DEFAULT NULL |
| 356 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 357 |
/*!50100 PARTITION BY RANGE (`c1`) |
| 358 |
SUBPARTITION BY HASH (`c2`) |
| 359 |
(PARTITION p1 VALUES LESS THAN (10) |
| 360 |
(SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB, |
| 361 |
SUBPARTITION s2 ENGINE = InnoDB), |
| 362 |
PARTITION p2 VALUES LESS THAN (20) |
| 363 |
(SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/remote_dir' ENGINE = InnoDB, |
| 364 |
SUBPARTITION s4 ENGINE = InnoDB)) */ |
| 365 |
=== information_schema.innodb_tablespaces and innodb_datafiles === |
| 366 |
Space_Name Space_Type Page_Size Zip_Size BlockSize!=0 FileSize!=0 Formats_Permitted Path |
| 367 |
mtr/asserted_test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 368 |
mtr/global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 369 |
mtr/test_ignored_global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 370 |
mtr/test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 371 |
test/t1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/t1.ibd |
| 372 |
test/t2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/t2.ibd |
| 373 |
test/tp1#p#p1 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tp1#p#p1.ibd |
| 374 |
test/tp1#p#p2 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 375 |
test/tsp1#p#p1#sp#s1 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 376 |
test/tsp1#p#p1#sp#s2 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tsp1#p#p1#sp#s2.ibd |
| 377 |
test/tsp1#p#p2#sp#s3 Single DEFAULT 0 1 1 Dynamic MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 378 |
test/tsp1#p#p2#sp#s4 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tsp1#p#p2#sp#s4.ibd |
| 379 |
ts1 General DEFAULT 0 1 1 Any MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 380 |
=== information_schema.files === |
| 381 |
Space_Name File_Type Engine Status Tablespace_Name Path |
| 382 |
mtr/asserted_test_suppressions TABLESPACE InnoDB NORMAL mtr/asserted_test_suppressions MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 383 |
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 384 |
mtr/test_ignored_global_suppressions TABLESPACE InnoDB NORMAL mtr/test_ignored_global_suppressions MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 385 |
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 386 |
test/t1 TABLESPACE InnoDB NORMAL test/t1 MYSQL_TMP_DIR/remote_dir/test/t1.ibd |
| 387 |
test/t2 TABLESPACE InnoDB NORMAL test/t2 MYSQL_TMP_DIR/remote_dir/test/t2.ibd |
| 388 |
test/tp1#p#p1 TABLESPACE InnoDB NORMAL test/tp1#p#p1 MYSQLD_DATADIR/test/tp1#p#p1.ibd |
| 389 |
test/tp1#p#p2 TABLESPACE InnoDB NORMAL test/tp1#p#p2 MYSQL_TMP_DIR/remote_dir/test/tp1#p#p2.ibd |
| 390 |
test/tsp1#p#p1#sp#s1 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s1 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p1#sp#s1.ibd |
| 391 |
test/tsp1#p#p1#sp#s2 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s2 MYSQLD_DATADIR/test/tsp1#p#p1#sp#s2.ibd |
| 392 |
test/tsp1#p#p2#sp#s3 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s3 MYSQL_TMP_DIR/remote_dir/test/tsp1#p#p2#sp#s3.ibd |
| 393 |
test/tsp1#p#p2#sp#s4 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s4 MYSQLD_DATADIR/test/tsp1#p#p2#sp#s4.ibd |
| 394 |
ts1 TABLESPACE InnoDB NORMAL ts1 MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 395 |
# |
| 396 |
# RENAME TABLE does not recreate tablespaces, so files in unknown |
| 397 |
# locations will remain there. No error message is issued. |
| 398 |
# |
| 399 |
RENAME TABLE t1 to temp1; |
| 400 |
SHOW CREATE TABLE temp1; |
| 401 |
Table Create Table |
| 402 |
temp1 CREATE TABLE `temp1` ( |
| 403 |
`c1` int DEFAULT NULL |
| 404 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir/' |
| 405 |
RENAME TABLE temp1 to t1; |
| 406 |
SHOW CREATE TABLE t1; |
| 407 |
Table Create Table |
| 408 |
t1 CREATE TABLE `t1` ( |
| 409 |
`c1` int DEFAULT NULL |
| 410 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci DATA DIRECTORY='MYSQL_TMP_DIR/remote_dir/' |
| 411 |
# |
| 412 |
# TRUNCATE the three tables to recreate all datafiles in the |
| 413 |
# default datafile location. |
| 414 |
# |
| 415 |
TRUNCATE TABLE t1; |
| 416 |
Warnings: |
| 417 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 418 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 419 |
SHOW WARNINGS; |
| 420 |
Level Code Message |
| 421 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 422 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 423 |
SHOW CREATE TABLE t1; |
| 424 |
Table Create Table |
| 425 |
t1 CREATE TABLE `t1` ( |
| 426 |
`c1` int DEFAULT NULL |
| 427 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 428 |
TRUNCATE TABLE t2; |
| 429 |
Warnings: |
| 430 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 431 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 432 |
SHOW WARNINGS; |
| 433 |
Level Code Message |
| 434 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 435 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 436 |
SHOW CREATE TABLE t2; |
| 437 |
Table Create Table |
| 438 |
t2 CREATE TABLE `t2` ( |
| 439 |
`c1` int DEFAULT NULL, |
| 440 |
`c2` int DEFAULT NULL |
| 441 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 442 |
TRUNCATE TABLE tp1; |
| 443 |
Warnings: |
| 444 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 445 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 446 |
SHOW WARNINGS; |
| 447 |
Level Code Message |
| 448 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 449 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 450 |
SHOW CREATE TABLE tp1; |
| 451 |
Table Create Table |
| 452 |
tp1 CREATE TABLE `tp1` ( |
| 453 |
`c1` int DEFAULT NULL |
| 454 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 455 |
/*!50100 PARTITION BY HASH (`c1`) |
| 456 |
(PARTITION p1 ENGINE = InnoDB, |
| 457 |
PARTITION p2 ENGINE = InnoDB) */ |
| 458 |
TRUNCATE TABLE tsp1; |
| 459 |
Warnings: |
| 460 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 461 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 462 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 463 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 464 |
SHOW WARNINGS; |
| 465 |
Level Code Message |
| 466 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 467 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 468 |
Warning 3121 The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location. |
| 469 |
Warning 1618 <DATA DIRECTORY> option ignored |
| 470 |
SHOW CREATE TABLE tsp1; |
| 471 |
Table Create Table |
| 472 |
tsp1 CREATE TABLE `tsp1` ( |
| 473 |
`c1` int DEFAULT NULL, |
| 474 |
`c2` int DEFAULT NULL |
| 475 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 476 |
/*!50100 PARTITION BY RANGE (`c1`) |
| 477 |
SUBPARTITION BY HASH (`c2`) |
| 478 |
(PARTITION p1 VALUES LESS THAN (10) |
| 479 |
(SUBPARTITION s1 ENGINE = InnoDB, |
| 480 |
SUBPARTITION s2 ENGINE = InnoDB), |
| 481 |
PARTITION p2 VALUES LESS THAN (20) |
| 482 |
(SUBPARTITION s3 ENGINE = InnoDB, |
| 483 |
SUBPARTITION s4 ENGINE = InnoDB)) */ |
| 484 |
=== information_schema.innodb_tablespaces and innodb_datafiles === |
| 485 |
Space_Name Space_Type Page_Size Zip_Size BlockSize!=0 FileSize!=0 Formats_Permitted Path |
| 486 |
mtr/asserted_test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 487 |
mtr/global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 488 |
mtr/test_ignored_global_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 489 |
mtr/test_suppressions Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 490 |
test/t1 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/t1.ibd |
| 491 |
test/t2 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/t2.ibd |
| 492 |
test/tp1#p#p1 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tp1#p#p1.ibd |
| 493 |
test/tp1#p#p2 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tp1#p#p2.ibd |
| 494 |
test/tsp1#p#p1#sp#s1 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tsp1#p#p1#sp#s1.ibd |
| 495 |
test/tsp1#p#p1#sp#s2 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tsp1#p#p1#sp#s2.ibd |
| 496 |
test/tsp1#p#p2#sp#s3 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tsp1#p#p2#sp#s3.ibd |
| 497 |
test/tsp1#p#p2#sp#s4 Single DEFAULT 0 1 1 Dynamic MYSQLD_DATADIR/test/tsp1#p#p2#sp#s4.ibd |
| 498 |
ts1 General DEFAULT 0 1 1 Any MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 499 |
=== information_schema.files === |
| 500 |
Space_Name File_Type Engine Status Tablespace_Name Path |
| 501 |
mtr/asserted_test_suppressions TABLESPACE InnoDB NORMAL mtr/asserted_test_suppressions MYSQLD_DATADIR/mtr/asserted_test_suppressions.ibd |
| 502 |
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd |
| 503 |
mtr/test_ignored_global_suppressions TABLESPACE InnoDB NORMAL mtr/test_ignored_global_suppressions MYSQLD_DATADIR/mtr/test_ignored_global_suppressions.ibd |
| 504 |
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd |
| 505 |
test/t1 TABLESPACE InnoDB NORMAL test/t1 MYSQLD_DATADIR/test/t1.ibd |
| 506 |
test/t2 TABLESPACE InnoDB NORMAL test/t2 MYSQLD_DATADIR/test/t2.ibd |
| 507 |
test/tp1#p#p1 TABLESPACE InnoDB NORMAL test/tp1#p#p1 MYSQLD_DATADIR/test/tp1#p#p1.ibd |
| 508 |
test/tp1#p#p2 TABLESPACE InnoDB NORMAL test/tp1#p#p2 MYSQLD_DATADIR/test/tp1#p#p2.ibd |
| 509 |
test/tsp1#p#p1#sp#s1 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s1 MYSQLD_DATADIR/test/tsp1#p#p1#sp#s1.ibd |
| 510 |
test/tsp1#p#p1#sp#s2 TABLESPACE InnoDB NORMAL test/tsp1#p#p1#sp#s2 MYSQLD_DATADIR/test/tsp1#p#p1#sp#s2.ibd |
| 511 |
test/tsp1#p#p2#sp#s3 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s3 MYSQLD_DATADIR/test/tsp1#p#p2#sp#s3.ibd |
| 512 |
test/tsp1#p#p2#sp#s4 TABLESPACE InnoDB NORMAL test/tsp1#p#p2#sp#s4 MYSQLD_DATADIR/test/tsp1#p#p2#sp#s4.ibd |
| 513 |
ts1 TABLESPACE InnoDB NORMAL ts1 MYSQL_TMP_DIR/remote_dir/ts1.ibd |
| 514 |
# |
| 515 |
# Validate the messages that should have been put into the error log. |
| 516 |
# |
| 517 |
Pattern "Cannot create a tablespace for table test/t1 because the directory is not a valid location. The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location" found |
| 518 |
Pattern "Cannot create a tablespace for table test/t2 because the directory is not a valid location. The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location" found |
| 519 |
Pattern "Cannot create a tablespace for table test/tp1#p#p2 because the directory is not a valid location. The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location" found |
| 520 |
Pattern "Cannot create a tablespace for table test/tsp1#p#p1#sp#s1 because the directory is not a valid location. The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location" found |
| 521 |
Pattern "Cannot create a tablespace for table test/tsp1#p#p2#sp#s3 because the directory is not a valid location. The DATA DIRECTORY location must be in a known directory. The DATA DIRECTORY location will be ignored and the file will be put into the default datadir location" found |
| 522 |
# |
| 523 |
# Cleanup the IBD tablespaces |
| 524 |
# |
| 525 |
DROP TABLE t1; |
| 526 |
DROP TABLE t2; |
| 527 |
DROP TABLE tp1; |
| 528 |
DROP TABLE tsp1; |
| 529 |
DROP TABLESPACE ts1; |
| 530 |
# |
| 531 |
# Cleanup the Undo IBU tablespaces |
| 532 |
# |
| 533 |
SELECT NAME, SPACE_TYPE, STATE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES |
| 534 |
WHERE NAME LIKE 'undo_0%' ORDER BY NAME; |
| 535 |
NAME SPACE_TYPE STATE |
| 536 |
undo_003 Undo active |
| 537 |
undo_004 Undo active |
| 538 |
ALTER UNDO TABLESPACE undo_003 SET INACTIVE; |
| 539 |
DROP UNDO TABLESPACE undo_003; |
| 540 |
DROP UNDO TABLESPACE undo_004; |