mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 02:30:06 +01:00
fb9da7f751
mariadb-backup with --prepare option could result in empty redo log file. When --prepare is followed by --prepare --export, we exit early in srv_start function without opening the ibdata1 tablespace. Later while trying to read rollback segment header page, we hit the debug assert which claims that the system space should already have been opened. There are two assert cases here. Issue-1: System tablespace object is not there in fil space hash i.e. srv_sys_space.open_or_create() is not called. Issue-2: The system tablespace data file ibdata1 is not opened i.e. fil_system.sys_space->open() is not called. Fix: For empty redo log and restore operation, open system tablespace before returning.
27 lines
554 B
Text
27 lines
554 B
Text
CREATE TABLE t1(i INT) ENGINE INNODB;
|
|
INSERT INTO t1 VALUES(1);
|
|
CREATE TABLE t21(i INT) ENGINE INNODB;
|
|
INSERT INTO t21 VALUES(1);
|
|
CREATE TABLE t2(i int) ENGINE INNODB;
|
|
# xtrabackup backup
|
|
t1.ibd
|
|
t21.ibd
|
|
# xtrabackup prepare
|
|
t1.cfg
|
|
t21.cfg
|
|
ALTER TABLE t1 DISCARD TABLESPACE;
|
|
ALTER TABLE t1 IMPORT TABLESPACE;
|
|
SELECT * FROM t1;
|
|
i
|
|
1
|
|
# MDEV-33023 Crash in mariadb-backup --prepare --export after --prepare
|
|
t1.cfg
|
|
t21.cfg
|
|
ALTER TABLE t1 DISCARD TABLESPACE;
|
|
ALTER TABLE t1 IMPORT TABLESPACE;
|
|
SELECT * FROM t1;
|
|
i
|
|
1
|
|
DROP TABLE t1;
|
|
DROP TABLE t2;
|
|
DROP TABLE t21;
|