mirror of
https://github.com/MariaDB/server.git
synced 2025-08-22 10:21:37 +02:00

page_delete_rec_list_end(): Do not attempt to scrub the data of
an empty record.
The test case would reproduce a debug assertion failure in branches
where commit 358921ce32
(MDEV-26938)
is present. MariaDB Server 10.6 only supports ascending indexes,
and in those, the empty string would always be sorted first, never
last in a page.
Nevertheless, we fix the bug also in 10.6, in case it would be
reproducible in a slightly different scenario.
Reviewed by: Thirunarayanan Balathandayuthapani
35 lines
1.2 KiB
Text
35 lines
1.2 KiB
Text
SET @save_debug=@@GLOBAL.INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG;
|
|
SET @save_scrub=@@GLOBAL.INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED;
|
|
SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED=1;
|
|
SET GLOBAL INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=2;
|
|
CREATE TABLE t1(f1 INT AUTO_INCREMENT PRIMARY KEY,
|
|
f2 VARCHAR(256) GENERATED ALWAYS as('repairman'),
|
|
INDEX idx(f2))ENGINE= InnoDB STATS_PERSISTENT=0;
|
|
INSERT INTO t1(f1) SELECT seq FROM seq_1_to_50;
|
|
FLUSH TABLE t1 FOR EXPORT;
|
|
FOUND 108 /repairman/ in t1.ibd
|
|
UNLOCK TABLES;
|
|
ALTER TABLE t1 DROP INDEX idx;
|
|
InnoDB 0 transactions not purged
|
|
FLUSH TABLE t1 FOR EXPORT;
|
|
NOT FOUND /repairman/ in t1.ibd
|
|
UNLOCK TABLES;
|
|
DROP TABLE t1;
|
|
#
|
|
# MDEV-37183 innodb_immediate_scrub_data_uncompressed=ON may break
|
|
# crash recovery
|
|
#
|
|
SET GLOBAL innodb_limit_optimistic_insert_debug=0;
|
|
CREATE TABLE t(a VARCHAR(1) PRIMARY KEY,INDEX(a DESC)) ENGINE=InnoDB;
|
|
INSERT INTO t VALUES('2'),('1'),(''),('6'),('4'),('3');
|
|
SET GLOBAL innodb_limit_optimistic_insert_debug=3;
|
|
INSERT INTO t VALUES('8');
|
|
CHECK TABLE t;
|
|
Table Op Msg_type Msg_text
|
|
test.t check status OK
|
|
SELECT COUNT(*) FROM t;
|
|
COUNT(*)
|
|
7
|
|
DROP TABLE t;
|
|
SET GLOBAL INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=@save_debug;
|
|
SET GLOBAL INNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSED=@save_scrub;
|