Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.1(EOL)
-
None
-
10.1.14
Description
Create a database using MySQL 5.6 server and create InnoDB table with DATA_DIRECTORY:
CREATE TABLE t1 (c1 INT PRIMARY KEY) DATA DIRECTORY = '/home/jan/mysql/db56/data2'; |
insert into t1 values (1),(2),(3); |
Shutdown server (cleanly) and start MariaDB 10.1 server to same data directory. Table is not found:
MariaDB [test]> select * from t1; |
ERROR 1932 (42S02): Table 'test.t1' doesn't exist in engine |
Error log contains:
2016-01-05 9:11:08 140737288095488 [ERROR] InnoDB: Failed to find tablespace for table '"test"."t1"' in the cache. Attempting to load the tablespace with space id 6.
|
2016-01-05 9:11:08 140737288095488 [ERROR] InnoDB: In file '/home/jan/mysql/db56/data2/test/t1.ibd', tablespace id and flags are 6 and 1024, but in the InnoDB data dictionary they are 6 and 131072. Have you moved InnoDB .ibd files around without using the commands DISCARD TABLESPACE and IMPORT TABLESPACE? Please refer to http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
|
2016-01-05 09:11:08 7ffff4104700 InnoDB: Operating system error number 2 in a file operation. InnoDB: The error means the system cannot find the path specified.
|
2016-01-05 9:11:08 140737288095488 [ERROR] InnoDB: Could not find a valid tablespace file for 'test/t1'. See http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
|
Attachments
Issue Links
- includes
-
MDEV-9581 [PATCH] Innodb in Mariadb-10.1.x is unable to start up with data files generated by older version
-
- Closed
-
commit 5dd0c77e9239217457cf795d6380bdd3bf0808ad
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Tue May 3 20:53:29 2016 +0300
MDEV-9362: InnoDB tables using DATA_DIRECTORY created usingMySQL 5.6 do not work with MariaDB 10.1
Analysis: Problem is that tablespace flags bit DATA_DIR
is on different position on MySQL 5.6 compared to
MariaDB 10.1.
Fix: If we detect that there is difference between dictionary
flags and tablespace flags we remove DATA_DIR flag and compare
again. Remote tablespace is tried to locate even in case
when DATA_DIR flag is not set.