1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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

@@ -34,22 +34,21 @@ INSERT INTO t1 VALUES(1),(2),(3);
--source include/start_mysqld.inc
# The ER_NO_SUCH_TABLE is being thrown by ha_innobase::open().
# The table does exist, only the tablespace does not exist.
--error ER_NO_SUCH_TABLE_IN_ENGINE
--error ER_GET_ERRNO
SELECT * FROM t;
--error ER_NO_SUCH_TABLE_IN_ENGINE
--error ER_GET_ERRNO
ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE
--error ER_GET_ERRNO
ALTER TABLE t ADD INDEX (a), ALGORITHM=COPY;
SHOW WARNINGS;
--error ER_NO_SUCH_TABLE_IN_ENGINE
--error ER_GET_ERRNO
ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=INPLACE;
--error ER_NO_SUCH_TABLE_IN_ENGINE
--error ER_GET_ERRNO
ALTER TABLE t AUTO_INCREMENT=1, ALGORITHM=COPY;
--error ER_PARSE_ERROR
@@ -60,7 +59,7 @@ ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE;
ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE;
ALTER TABLE t DISCARD TABLESPACE;
DROP TABLE t;
--error ER_NO_SUCH_TABLE_IN_ENGINE
--error ER_GET_ERRNO
SELECT * FROM `x..d`;
DROP TABLE `x..d`;