Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
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)
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
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;
-----
-----+-----
-----+-----
-----+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;
--------
------------------------------------------------------+--------
------------------------------------------------------+--------
------------------------------------------------------+