mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
5a58935cb9
The issue is introduced by "MDEV-28699: Shrink temporary tablespaces without restart". SRV_FORCE_NO_LOG_REDO forces server to read only mode and we don't initialize temporary tablespace in read only mode. solution: innodb_truncate_temporary_tablespace_now should be no-op in read only mode.
46 lines
1.7 KiB
Text
46 lines
1.7 KiB
Text
# MDEV-33101 Server crashes when starting the server with
|
|
# innodb-force-recovery=6 and enabling the
|
|
# innodb_truncate_temporary_tablespace_now variable
|
|
# restart: --innodb-force-recovery=6
|
|
SHOW VARIABLES LIKE "innodb_read_only";
|
|
Variable_name Value
|
|
innodb_read_only ON
|
|
SET GLOBAL innodb_truncate_temporary_tablespace_now=1;
|
|
# restart
|
|
CREATE TEMPORARY TABLE t1(f1 INT NOT NULL,
|
|
f2 INT NOT NULL)ENGINE=InnoDB;
|
|
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_65536;
|
|
DROP TABLE t1;
|
|
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE=4294967294;
|
|
NAME FILE_SIZE
|
|
innodb_temporary 72351744
|
|
SET GLOBAL INNODB_TRUNCATE_TEMPORARY_TABLESPACE_NOW= 0;
|
|
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE=4294967294;
|
|
NAME FILE_SIZE
|
|
innodb_temporary 72351744
|
|
SET GLOBAL INNODB_TRUNCATE_TEMPORARY_TABLESPACE_NOW= 1;
|
|
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE= 4294967294;
|
|
NAME FILE_SIZE
|
|
innodb_temporary 5242880
|
|
CREATE TEMPORARY TABLE t1(f1 INT NOT NULL,
|
|
f2 INT NOT NULL)ENGINE=InnoDB;
|
|
BEGIN;
|
|
INSERT INTO t1 SELECT seq, seq FROM seq_1_to_65536;
|
|
connect con1,localhost,root,,,;
|
|
CREATE TEMPORARY TABLE t2(f1 INT NOT NULL,
|
|
f2 INT NOT NULL)ENGINE=InnoDB;
|
|
INSERT INTO t2 SELECT seq, seq FROM seq_1_to_65536;
|
|
DROP TABLE t2;
|
|
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE=4294967294;
|
|
NAME FILE_SIZE
|
|
innodb_temporary 72351744
|
|
SET GLOBAL INNODB_TRUNCATE_TEMPORARY_TABLESPACE_NOW= 1;
|
|
SELECT NAME, FILE_SIZE FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE SPACE= 4294967294;
|
|
NAME FILE_SIZE
|
|
innodb_temporary 7340032
|
|
connection default;
|
|
COMMIT;
|
|
SELECT COUNT(*) FROM t1;
|
|
COUNT(*)
|
|
65536
|
|
DROP TABLE t1;
|