Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.6, 12.3
-
None
-
Can result in unexpected behaviour
Description
Starting with:
CREATE TABLE t (c INT) ENGINE=InnoDB; |
ALTER TABLE t DISCARD TABLESPACE; |
Leads to no errors in the CLI nor the error log (inc after for example FLUSH TABLES or a full shutdown/restart). Then, upon issuing:
ALTER TABLE t IMPORT TABLESPACE; |
We see in the CLI:
|
CS 12.3.1 21a0714a118614982d20bfa504763d7247800091 (Debug, Clang 21.1.3-20250923) Build 17/02/2026 |
12.3.1-dbg>ALTER TABLE t IMPORT TABLESPACE;
|
ERROR 1030 (HY000): Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
|
Which is to be expected. However, in the error log we now see (always in this order):
|
CS 12.3.1 21a0714a118614982d20bfa504763d7247800091 (Debug, Clang 21.1.3-20250923) Build 17/02/2026 |
2026-02-18 12:13:57 4 [ERROR] InnoDB: Operating system error number 2 in a file operation.
|
2026-02-18 12:13:57 4 [ERROR] InnoDB: Error number 2 means 'No such file or directory'
|
2026-02-18 12:13:57 4 [Note] InnoDB: Some operating system error numbers are described at https://mariadb.com/kb/en/library/operating-system-error-codes/
|
2026-02-18 12:13:57 4 [ERROR] InnoDB: could not open the tablespace file ./test/t.ibd.
|
 |
2026-02-18 12:13:57 4 [Note] InnoDB: Discarding tablespace of table `test`.`t`: Tablespace not found
|
The final line (discard note) is out of order. It may also be good to remove the erroneous empty line. Also, when the tablespace was discarded it would have been found, and thus the message itself is incorrect.
10.6 Is the same, though no open line:
|
CS 10.6.25 cd02709a315c9f08965d6b8fb7e75baaae17a4f4 (Optimized, Clang 21.1.3-20250923) Build 23/01/2026 |
2026-02-18 12:40:34 4 [ERROR] InnoDB: Operating system error number 2 in a file operation.
|
2026-02-18 12:40:34 4 [ERROR] InnoDB: The error means the system cannot find the path specified.
|
2026-02-18 12:40:34 4 [ERROR] InnoDB: Trying to import a tablespace, but could not open the tablespace file ./test/t.ibd
|
2026-02-18 12:40:34 4 [Note] InnoDB: Discarding tablespace of table `test`.`t`: Tablespace not found
|
Attachments
Issue Links
- relates to
-
MDEV-26137 ALTER TABLE IMPORT enhancement
-
- Closed
-