Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-2132

Error: "Schema mismatch (Column date precise type mismatch.)" during a partial backup import

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 8.0.10
    • Fix Version/s: 8.0.12
    • Component/s: None
    • Labels:
      None

      Description

      Hello all,

       

      The issue:

      I am unable to import a table which has been exported via xtrabackup --prepare --export.

       

      Environment:

      A Debian 10 server with the default Percona server configuration.

      Versions:

      percona-server-server 8.0.18-9-1.buster
      percona-xtrabackup-80 8.0.10-1.buster

       Steps to reproduce:

      mysql> CREATE DATABASE test;
      mysql> USE test;
      mysql> CREATE TABLE `tab1` (
        `id` bigint(20) NOT NULL,
        `date` date NOT NULL,
        PRIMARY KEY (`id`,`date`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED;
      mysql> INSERT INTO tab1 set id=1, date='2020-03-20';
      
      # xtrabackup --backup --databases="test" --target-dir=/data/target
      # xtrabackup --prepare --export --target-dir=/data/target
      
      mysql> DROP DATABASE test;
      mysql> CREATE DATABASE test;
      mysql> USE test;
      mysql> CREATE TABLE `tab1` (
        `id` bigint(20) NOT NULL,
        `date` date NOT NULL,
        PRIMARY KEY (`id`,`date`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPRESSED;
      mysql> ALTER TABLE tab1 DISCARD TABLESPACE;
      
      # cp /data/target_var/test/tab1.* /var/lib/mysql/test/
      # chown mysql:mysql /var/lib/mysql/test/tab1.*
      
      mysql> ALTER TABLE tab1 IMPORT TABLESPACE;
      ERROR 1808 (HY000): Schema mismatch (Column date precise type mismatch.)
      
      

      Attached you will find the stdout of xtrabackup runs.

      If you need any further Information, feel free to contact me.

       

      Thanks,

      Antoine

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned
                Reporter:
                antoineD Antoine Duranel
                Votes:
                5 Vote for this issue
                Watchers:
                8 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: