Hi
I am testing partial incremental backups with XtraBackup. All goes well until I try to run ‘ALTER TABLE datbase.table IMPORT TABLESPACE’ for a table that has a decimal column. When I run this sql command for a table with a decimal column I receive the error ‘Error Code: 1808. Schema mismatch (Column columnName precise type mismatch.)’ where columnName is a decimal column.
If a table does not have a decimal column I do not run into any problems
I am running
mysq: Version: 8.0.16
xtrabackup: 8.0.6
OS: CentOS Linux release 7.6.1810
The steps I followed are listed below
A) Full/incremental backups for database ‘dbname’
xtrabackup --user=xxx --host=localhost --password=123 --backup --databases=‘dbname’ --target-dir=/backups/partial/mysql
xtrabackup --user=xxx --host=localhost --password=123 --backup --databases=‘dbname’ --target-dir=/backups/partial/inc001/ --incremental-basedir=/backups/partial/mysql
xtrabackup --user=xxx–host=localhost --password=123 --backup --databases=‘dbname’ --target-dir=/backups/partial/inc002/ --incremental-basedir=/backups/partial/inc001
B) Preparation
xtrabackup --prepare --apply-log-only --export --target-dir=/backups/partial/mysql
xtrabackup --prepare --apply-log-only --export --target-dir=/backups/partial/mysql --incremental-dir=/backups/partial/inc001
xtrabackup --prepare --apply-log-only --export --target-dir=/backups/partial/mysql --incremental-dir=/backups/partial/inc002
xtrabackup --prepare --export --target-dir=/backups/partial/mysql
C) Restore to same database on same server
i) Delete and recreate all tables in the database as before
ii) ‘ALTER TABLE database.table DISCARD TABLESPACE’ for all tables
iii) Copy the exported files (.ibd and .cfg) from ‘/backups/partial/mysql’ to the subdirectory of the destination server’s data directory (and change owner/group to mysql)
iv) ‘ALTER TABLE database.table IMPORT TABLESPACE’ - which runs into the issue for tables with columns with decimal values
I am wondering if anybody else has run into this issue.
Thanks