Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-2548

LP:534626 - MyISAM table created in MariaDB not readable by MySQL

    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

            Hide
            hakanküçükyılmaz Hakan Küçükyılmaz added a comment -

            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

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

            Show
            hakanküçükyılmaz Hakan Küçükyılmaz added a comment - 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 -------- ------ -------- ----------------------------------------+
            Hide
            hakanküçükyılmaz Hakan Küçükyılmaz added a comment -

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

            Show
            hakanküçükyılmaz Hakan Küçükyılmaz added a comment - Re: MyISAM table created in MariaDB not readable by MySQL I get the same error on Mac OS X 10.6.2
            Hide
            colin Colin Charles added a comment -

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

            Show
            colin Colin Charles added a comment - Re: MyISAM table created in MariaDB not readable by MySQL If it matters, Mac OS X 10.5.8 also.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 534626

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 534626

              People

              • Assignee:
                Unassigned
                Reporter:
                harrisonfisk Harrison Fisk
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: