| 1 |
# |
| 2 |
# Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING |
| 3 |
# OR DISCARDED TABLESPACES |
| 4 |
# |
| 5 |
CREATE TABLE t(a SERIAL)ENGINE=InnoDB; |
| 6 |
CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; |
| 7 |
CREATE TABLE t1(a SERIAL)ENGINE=InnoDB; |
| 8 |
INSERT INTO t1 VALUES(1),(2),(3); |
| 9 |
# restart |
| 10 |
SELECT * FROM t; |
| 11 |
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB |
| 12 |
ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE; |
| 13 |
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB |
| 14 |
SHOW WARNINGS; |
| 15 |
Level Code Message |
| 16 |
Warning 1812 Tablespace is missing for table 'test/t' |
| 17 |
Error 1030 Got error 194 "Tablespace is missing for a table" from storage engine InnoDB |
| 18 |
ALTER TABLE t ADD INDEX (a), ALGORITHM=COPY; |
| 19 |
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB |
| 20 |
SHOW WARNINGS; |
| 21 |
Level Code Message |
| 22 |
Warning 1812 Tablespace is missing for table 'test/t' |
| 23 |
Error 1030 Got error 194 "Tablespace is missing for a table" from storage engine InnoDB |
| 24 |
ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=INPLACE; |
| 25 |
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB |
| 26 |
ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=COPY; |
| 27 |
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB |
| 28 |
ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE; |
| 29 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DISCARD TABLESPACE' at line 1 |
| 30 |
ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE; |
| 31 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DISCARD TABLESPACE' at line 1 |
| 32 |
ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE; |
| 33 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DISCARD TABLESPACE' at line 1 |
| 34 |
ALTER TABLE t DISCARD TABLESPACE; |
| 35 |
Warnings: |
| 36 |
Warning 1812 Tablespace is missing for table 'test/t' |
| 37 |
Warning 1812 Tablespace is missing for table 'test/t' |
| 38 |
RENAME TABLE t TO u; |
| 39 |
RENAME TABLE u TO v; |
| 40 |
DROP TABLE v; |
| 41 |
SELECT * FROM `x..d`; |
| 42 |
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB |
| 43 |
DROP TABLE `x..d`; |
| 44 |
ALTER TABLE t1 DISCARD TABLESPACE; |
| 45 |
ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE; |
| 46 |
ERROR HY000: Tablespace has been discarded for table `t1` |
| 47 |
ALTER TABLE t1 AUTO_INCREMENT=1, FORCE, ALGORITHM=INPLACE; |
| 48 |
ERROR HY000: Tablespace has been discarded for table `t1` |
| 49 |
ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=COPY; |
| 50 |
ERROR HY000: Tablespace has been discarded for table `t1` |
| 51 |
DROP TABLE t1; |