mirror of
https://github.com/MariaDB/server.git
synced 2026-05-11 01:20:15 +02:00
- Store the deferred tablespace name while loading the tablespace for backup process. - Mariabackup stores the list of space ids which has page0 INIT_PAGE records. backup_first_page_op() and first_page_init() was introduced to track the page0 INIT_PAGE records. - backup_file_op() and log_file_op() was changed to handle FILE_MODIFY redo log records. It is used to identify the deferred tablespace space id. - Whenever file operation redo log was processed by backup, backup_file_op() should check whether the space name exist in deferred tablespace. If it is then it needs to store the space id, name when FILE_MODIFY, FILE_RENAME redo log processed and it should delete the tablespace name from defer list in other cases. - backup_fix_ddl() should check whether deferred tablespace has any page0 init records. If it is then consider the tablespace as newly created tablespace. If not then backup should try to reload the tablespace with SRV_BACKUP_NO_DEFER mode to avoid the deferring of tablespace.
26 lines
763 B
Text
26 lines
763 B
Text
call mtr.add_suppression("InnoDB: Expected tablespace id .*");
|
|
# Mariabackup --backup with page0 INIT_PAGE redo record
|
|
# and there is no FILE_CREATE for the tablespace t1
|
|
SET DEBUG_DBUG="+d,checkpoint_after_file_create";
|
|
CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES(1);
|
|
# xtrabackup backup
|
|
# xtrabackup prepare
|
|
# shutdown server
|
|
# remove datadir
|
|
# xtrabackup move back
|
|
# restart
|
|
SELECT * FROM t1;
|
|
f1
|
|
1
|
|
DROP TABLE t1;
|
|
SET DEBUG_DBUG="-d,checkpoint_after_file_create";
|
|
# Mariabackup fails after corrupting the page0 in disk
|
|
# and there is no INIT_PAGE for page0
|
|
CREATE TABLE t1(c INT) ENGINE=INNODB;
|
|
# Corrupt the table
|
|
# restart
|
|
# xtrabackup backup
|
|
FOUND 10 /Header page consists of zero bytes*/ in backup.log
|
|
UNLOCK TABLES;
|
|
DROP TABLE t1;
|