MyISAM table created in MariaDB not readable by MySQL

Bug #534626 reported by Harrison Fisk
8
This bug affects 1 person
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)
Revision history for this message
Hakan Küçükyılmaz (hakan-askmonty) wrote :

bzr branch -rtag:mariadb-5.1.42 maria-local-master/ mariadb-5.1.42
BUILD/compile-amd64-max --prefix=/usr/local/mariadb-5.1.42

bzr branch -rtag:mysql-5.1.42 mysql-server-local-master/ mysql-5.1.42
BUILD/compile-amd64-max --prefix=/usr/local/mysql-5.1.42

On Linux:
Start MariaDB 5.1.42
hakan@lu0012:/usr/local$ /usr/local/mysql/bin/mysql -uroot
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]>
MariaDB [test]> Bye
hakan@lu0012:/usr/local$ /usr/local/mysql/bin/mysqladmin -uroot shutdown

Start MySQL 5.1.42
hakan@lu0012:/usr/local$ /usr/local/mysql/bin/mysql -uroot test
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 |
+---------+--------+----------+-----------------------------------------+

Changed in maria:
status: New → Confirmed
Revision history for this message
Hakan Küçükyılmaz (hakan-askmonty) wrote :

I get the same error on Mac OS X 10.6.2

Revision history for this message
Colin Charles (ccharles) wrote :

If it matters, Mac OS X 10.5.8 also.

Michael Widenius (monty)
Changed in maria:
status: Confirmed → Fix Committed
Michael Widenius (monty)
Changed in maria:
importance: Undecided → High
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.