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

DATETIME w/ transportable tablespaces from MySQL 5.6 to MariaDB 10.0 gives "precise type mismatch" error.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.0.12
    • Fix Version/s: 10.1
    • Component/s: None
    • Labels:
      None

      Description

      mysql 5.6.17 (root) [test] db1> CREATE TABLE `t1` (
          ->   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
          ->   `d` datetime DEFAULT NULL,
          ->   PRIMARY KEY (`id`)
          -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
      Query OK, 0 rows affected (0.11 sec)
      
      mysql 5.6.17 (root) [test] db1> flush table t1 for export;
      Query OK, 0 rows affected (0.01 sec)
      
      mysql 5.5.5-10.0.12-MariaDB (root) [test] db1> CREATE TABLE `t1` (
          ->   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
          ->   `d` datetime DEFAULT NULL,
          ->   PRIMARY KEY (`id`)
          -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
          -> ;
      Query OK, 0 rows affected (0.08 sec)
      
      mysql 5.5.5-10.0.12-MariaDB (root) [test] db1> alter table t1 discard tablespace;
      Query OK, 0 rows affected (0.01 sec)
      
      mysql 5.5.5-10.0.12-MariaDB (root) [test] db1>
      [2]+  Stopped                 mysql
      [kolbe@centos6-build mariadb-10.0.12-linux-x86_64]$ cp ~/t1.{cfg,ibd} ./data/test/
      [kolbe@centos6-build mariadb-10.0.12-linux-x86_64]$ fg
      mysql
      mysql 5.5.5-10.0.12-MariaDB (root) [test] db1>
      mysql 5.5.5-10.0.12-MariaDB (root) [test] db1> alter table t1 import tablespace;
      ERROR 1808 (HY000): Schema mismatch (Column d precise type mismatch.)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              It looks related to what Alexander Barkov is working on in scope of MDEV-5377.

              Show
              elenst Elena Stepanova added a comment - It looks related to what Alexander Barkov is working on in scope of MDEV-5377 .
              Hide
              kolbe Kolbe Kegel added a comment -

              Is there any update on this? This issue makes it impossible to import InnoDB tablespaces exported from MySQL 5.6.

              Show
              kolbe Kolbe Kegel added a comment - Is there any update on this? This issue makes it impossible to import InnoDB tablespaces exported from MySQL 5.6.
              Hide
              serg Sergei Golubchik added a comment -

              Unfortunately, there isn't much we can do about it. MySQL-5.6 creates temporal fields that are binary incompatible with MariaDB-5.3 and later. MariaDB can read and write MySQL-5.6 temporal fields, but it cannot create them. But for import tablespace to work — see your example — one needs to create a table with the MySQL-5.6 temporal fields.

              We plan to add this in 10.1.

              Show
              serg Sergei Golubchik added a comment - Unfortunately, there isn't much we can do about it. MySQL-5.6 creates temporal fields that are binary incompatible with MariaDB-5.3 and later. MariaDB can read and write MySQL-5.6 temporal fields, but it cannot create them. But for import tablespace to work — see your example — one needs to create a table with the MySQL-5.6 temporal fields. We plan to add this in 10.1.

                People

                • Assignee:
                  bar Alexander Barkov
                  Reporter:
                  kolbe Kolbe Kegel
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 40 minutes
                    40m