1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-19886 InnoDB returns misleading ER_NO_SUCH_TABLE_IN_ENGINE

A fix in MySQL 5.7.6 was not completely merged to MariaDB:
Bug#19419026 WHEN A TABLESPACE IS NOT FOUND, DO NOT REPORT "TABLE NOT FOUND"
This commit is contained in:
Marko Mäkelä
2019-06-27 15:39:04 +03:00
parent 6d2b236568
commit 92feac53a6
9 changed files with 74 additions and 30 deletions

View File

@ -8,23 +8,23 @@ CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
CREATE TABLE t1(a SERIAL)ENGINE=InnoDB;
INSERT INTO t1 VALUES(1),(2),(3);
SELECT * FROM t;
ERROR 42S02: Table 'test.t' doesn't exist in engine
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
ERROR 42S02: Table 'test.t' doesn't exist in engine
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
SHOW WARNINGS;
Level Code Message
Warning 1812 Tablespace is missing for table 'test/t'
Error 1932 Table 'test.t' doesn't exist in engine
Error 1030 Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
ALTER TABLE t ADD INDEX (a), ALGORITHM=COPY;
ERROR 42S02: Table 'test.t' doesn't exist in engine
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
SHOW WARNINGS;
Level Code Message
Warning 1812 Tablespace is missing for table 'test/t'
Error 1932 Table 'test.t' doesn't exist in engine
Error 1030 Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=INPLACE;
ERROR 42S02: Table 'test.t' doesn't exist in engine
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=COPY;
ERROR 42S02: Table 'test.t' doesn't exist in engine
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE;
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
ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE;
@ -37,7 +37,7 @@ Warning 1812 Tablespace is missing for table 'test/t'
Warning 1812 Tablespace is missing for table 'test/t'
DROP TABLE t;
SELECT * FROM `x..d`;
ERROR 42S02: Table 'test.x..d' doesn't exist in engine
ERROR HY000: Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
DROP TABLE `x..d`;
ALTER TABLE t1 DISCARD TABLESPACE;
ALTER TABLE t1 AUTO_INCREMENT=1, ALGORITHM=INPLACE;