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

Partitioned Aria table created by a previous version is recognized as TEST_SQL_DISCOVERY

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.2, 5.5.31
    • 10.0.4, 5.5.32
    • None
    • None

    Description

      I create a simple Aria table on MariaDB server 5.5 (or 5.2, or 5.3):

      create table t1 (i int) engine=Aria partition by hash(i);

      Then I shutdown the server gracefully:

      130501 23:29:25  InnoDB: Starting shutdown...
      130501 23:29:26  InnoDB: Shutdown completed; log sequence number 1597945
      130501 23:29:26 [Note] /home/elenst/bzr/5.5/sql/mysqld: Shutdown complete

      Then I create a new clean datadir for 10.0 server and bootstrap it.
      Then I copy the table files from 5.5 datadir to the new 10.0 datadir:

      t1.frm       
      t1.par       
      t1#P#p0.MAD  
      t1#P#p0.MAI

      Then I start 10.0 server, it starts without complaints.
      I also run mysql_upgrade (it's optional, doesn't matter whether I do it or not):

      ...
      performance_schema
      test
      test.t1                                            OK

      Then I connect to the server and look at the table:

      MariaDB [test]> show create table t1;
      +-------+-------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                        |
      +-------+-------------------------------------------------------------------------------------------------------------------------------------+
      | t1    | CREATE TABLE `t1` (
        `i` int(11) DEFAULT NULL
      ) ENGINE=TEST_SQL_DISCOVERY DEFAULT CHARSET=latin1
      /*!50100 PARTITION BY HASH (i) */ |
      +-------+-------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)

      And it behaves like TEST_SQL_DISCOVERY, too:

      MariaDB [test]> insert into t1 values (1);
      ERROR 1031 (HY000): Storage engine TEST_SQL_DISCOVERY of the table `test`.`t1` doesn't have this option

      If I start or build server without TEST_SQL_DISCOVERY, the table is correctly recognized as Aria.

      I can't make up a cross-version MTR test, so I will attach the files I copied into 10.0 datadir in the previously described test – that is, files created by 5.5, but never touched by 10.0 yet.

      Attachments

        1. t1.frm
          8 kB
        2. t1.par
          0.0 kB
        3. t1#P#p0.MAD
          8 kB
        4. t1#P#p0.MAI
          8 kB

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.