[MDEV-2548] LP:534626 - MyISAM table created in MariaDB not readable by MySQL Created: 2010-03-08  Updated: 2012-10-04  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Harrison Fisk (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug534626.xml    

 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)



 Comments   
Comment by Hakan Küçükyılmaz (Inactive) [ 2010-03-09 ]

Re: MyISAM table created in MariaDB not readable by MySQL
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

--------------------------------------------------------------+

Comment by Hakan Küçükyılmaz (Inactive) [ 2010-03-09 ]

Re: MyISAM table created in MariaDB not readable by MySQL
I get the same error on Mac OS X 10.6.2

Comment by Colin Charles [ 2010-03-09 ]

Re: MyISAM table created in MariaDB not readable by MySQL
If it matters, Mac OS X 10.5.8 also.

Comment by Rasmus Johansson (Inactive) [ 2010-06-28 ]

Launchpad bug id: 534626

Generated at Thu Feb 08 06:42:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.