MyISAM table created in MariaDB not readable by MySQL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Hakan Küçükyılmaz |
Bug Description
I created a simple table in MariaDB and then when I tried to access it in MySQL, the table is reported as damaged and can't be repaired.
Versions used were 5.1.42 of each on Linux x86.
Script:
In MariaDB:
use test;
CREATE TABLE t1 (a char(100), b int) ENGINE=myisam;
INSERT INTO t1 values ('aaaa', 10);
SELECT * FROM t1;
Shutdown MariaDB and point MySQL at the same datadir.
In MySQL:
use test;
SELECT * FROM t1;
REPAIR TABLE t1;
Errors from MySQL:
mysql> select * from t1;
ERROR 1035 (HY000): Old key file for table 't1'; repair it!
mysql> repair table t1;
+------
| Table | Op | Msg_type | Msg_text |
+------
| test.t1 | repair | Error | Old key file for table 't1'; repair it! |
| test.t1 | repair | error | Corrupt |
+------
2 rows in set (0.00 sec)
Changed in maria: | |
assignee: | nobody → Hakan Küçükyılmaz (hakan-askmonty) |
Changed in maria: | |
status: | Confirmed → Fix Committed |
Changed in maria: | |
importance: | Undecided → High |
Changed in maria: | |
status: | Fix Committed → Fix Released |
bzr branch -rtag:mariadb- 5.1.42 maria-local-master/ mariadb-5.1.42 amd64-max --prefix= /usr/local/ mariadb- 5.1.42
BUILD/compile-
bzr branch -rtag:mysql-5.1.42 mysql-server- local-master/ mysql-5.1.42 amd64-max --prefix= /usr/local/ mysql-5. 1.42
BUILD/compile-
On Linux: /usr/local$ /usr/local/ mysql/bin/ mysql -uroot
Start MariaDB 5.1.42
hakan@lu0012:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1
Server version: 5.1.42-MariaDB Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create schema test; use test;
Query OK, 1 row affected (0.00 sec)
Database changed
MariaDB [test]> CREATE TABLE t1 (a char(100), b int) ENGINE=myisam;
Query OK, 0 rows affected (0.00 sec)
MariaDB [test]> INSERT INTO t1 values ('aaaa', 10);
Query OK, 1 row affected (0.00 sec)
MariaDB [test]> SELECT * FROM t1;
+------+------+
| a | b |
+------+------+
| aaaa | 10 |
+------+------+
1 row in set (0.00 sec)
MariaDB [test]> /usr/local$ /usr/local/ mysql/bin/ mysqladmin -uroot shutdown
MariaDB [test]> Bye
hakan@lu0012:
Start MySQL 5.1.42 /usr/local$ /usr/local/ mysql/bin/ mysql -uroot test
hakan@lu0012:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.42 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SELECT * FROM t1; ---+--- -----+- ------- --+---- ------- ------- ------- ------- ------- --+ ---+--- -----+- ------- --+---- ------- ------- ------- ------- ------- --+ ---+--- -----+- ------- --+---- ------- ------- ------- ------- ------- --+
ERROR 1035 (HY000): Old key file for table 't1'; repair it!
mysql> REPAIR TABLE t1;
+------
| Table | Op | Msg_type | Msg_text |
+------
| test.t1 | repair | Error | Old key file for table 't1'; repair it! |
| test.t1 | repair | error | Corrupt |
+------