Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
None
-
None
-
None
Description
Hi all:
we use xtrbackup 8.0.25 and mysql 8.0.23 full database backup and then recovery single table. but have instant column table can't recovery.
1、create table
create table testins(id int primary key);
insert into testins values(10);
insert into testins values(20);
alter table testins add name varchar(20);
2、
backup,then apply log and export cfg file
xtrabackup --prepare --target-dir=/bak/bak3/
xtrabackup --prepare --export --target-dir=/bak/bak3/
3、issue 1
import database create table and add instant column
create table testins(id int primary key);
alter table testins add name varchar(20);
mysql> alter table testins discard tablespace;
Query OK, 0 rows affected (0.01 sec)
mysql> alter table testins import tablespace;
ERROR 1808 (HY000): Schema mismatch (The .cfg file indicates no INSTANT column in the source table whereas the metadata in data dictionary says there are instant columns in the target table)
4、issue 2
import database create table only
create table testins(id int primary key,name varchar(20));
mysql> alter table testins import tablespace;(xtr cfg)
ERROR 1817 (HY000): Index corrupt: Clustered index validation failed, due to data file corruption.
note mysql export and import is success.
we find xtrbackup export cfg file,format is IB_EXPORT_CFG_VERSION_V2,not have instant column info,so instant column To deal with failure.
for example row_import_read_columns function
if (cfg->m_version >= IB_EXPORT_CFG_VERSION_V3) {
bool read = false;
dberr_t err;
err = row_import_read_default_values(file, col, &cfg->m_heap, &read);
if (err != DB_SUCCESS)
{ ib_senderrf(thd, IB_LOG_LEVEL_ERROR, ER_IO_READ_ERROR, errno, strerror(errno), "while reading table column" " default value."); return (err); }if (read)
{ ++cfg->m_n_instant_cols; }}
mysql fulsh table export tablespace format now is IB_EXPORT_CFG_VERSION_V6.
thanks!
Attachments
Issue Links
- duplicates
-
PXB-2808 FLUSH TABLE t FOR EXPORT or ALTER TABLE t2 IMPORT TABLESPACE
-
- Done
-