| 1 |
--source include/not_embedded.inc |
| 2 |
--source include/innodb_page_size.inc |
| 3 |
--source include/no_valgrind_without_big.inc |
| 4 |
|
| 5 |
--echo # |
| 6 |
--echo # Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING |
| 7 |
--echo # OR DISCARDED TABLESPACES |
| 8 |
--echo # |
| 9 |
|
| 10 |
--disable_query_log |
| 11 |
call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: "); |
| 12 |
call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation"); |
| 13 |
call mtr.add_suppression("InnoDB: Error number \\d+ means"); |
| 14 |
call mtr.add_suppression("InnoDB: Ignoring tablespace for test/\(t\|x@002e@002ed\) because it could not be opened"); |
| 15 |
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing"); |
| 16 |
call mtr.add_suppression("Could not find a valid tablespace file for"); |
| 17 |
call mtr.add_suppression("InnoDB: Failed to find tablespace for table `test`\.`\(t\|x\.\.d\)` in the cache"); |
| 18 |
call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found"); |
| 19 |
call mtr.add_suppression("Table .* in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist"); |
| 20 |
call mtr.add_suppression("InnoDB: ALTER TABLE `test`.`t` DISCARD TABLESPACE failed to find tablespace"); |
| 21 |
--enable_query_log |
| 22 |
|
| 23 |
let $MYSQLD_DATADIR=`select @@datadir`; |
| 24 |
CREATE TABLE t(a SERIAL)ENGINE=InnoDB; |
| 25 |
CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; |
| 26 |
CREATE TABLE t1(a SERIAL)ENGINE=InnoDB; |
| 27 |
INSERT INTO t1 VALUES(1),(2),(3); |
| 28 |
|
| 29 |
--source include/shutdown_mysqld.inc |
| 30 |
|
| 31 |
# Remove the tablespace files. |
| 32 |
--remove_file $MYSQLD_DATADIR/test/t.ibd |
| 33 |
--remove_file $MYSQLD_DATADIR/test/x@[email protected] |
| 34 |
|
| 35 |
--source include/start_mysqld.inc |
| 36 |
|
| 37 |
# The table does exist, only the tablespace does not exist. |
| 38 |
--error ER_GET_ERRNO |
| 39 |
SELECT * FROM t; |
| 40 |
|
| 41 |
--error ER_GET_ERRNO |
| 42 |
ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE; |
| 43 |
SHOW WARNINGS; |
| 44 |
|
| 45 |
--error ER_GET_ERRNO |
| 46 |
ALTER TABLE t ADD INDEX (a), ALGORITHM=COPY; |
| 47 |
SHOW WARNINGS; |
| 48 |
|
| 49 |
--error ER_GET_ERRNO |
| 50 |
ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=INPLACE; |
| 51 |
--error ER_GET_ERRNO |
| 52 |
ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=COPY; |
| 53 |
|
| 54 |
--error ER_PARSE_ERROR |
| 55 |
ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE; |
| 56 |
--error ER_PARSE_ERROR |
| 57 |
ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE; |
| 58 |
--error ER_PARSE_ERROR |
| 59 |
ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE; |
| 60 |
ALTER TABLE t DISCARD TABLESPACE; |
| 61 |
RENAME TABLE t TO u; |
| 62 |
RENAME TABLE u TO v; |
| 63 |
DROP TABLE v; |
| 64 |
--error ER_GET_ERRNO |
| 65 |
SELECT * FROM `x..d`; |
| 66 |
DROP TABLE `x..d`; |
| 67 |
|
| 68 |
ALTER TABLE t1 DISCARD TABLESPACE; |
| 69 |
--error ER_TABLESPACE_DISCARDED |
| 70 |
ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE; |
| 71 |
--error ER_TABLESPACE_DISCARDED |
| 72 |
ALTER TABLE t1 AUTO_INCREMENT=1, FORCE, ALGORITHM=INPLACE; |
| 73 |
--error ER_TABLESPACE_DISCARDED |
| 74 |
ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=COPY; |
| 75 |
DROP TABLE t1; |