mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
2f7d91bb6c
The test innodb.innodb_wl6326 that had been disabled in 10.4 due to
MDEV-21535 is failing on 10.5 due to a different reason: the removal
of the MLOG_COMP_END_COPY_CREATED operations in MDEV-12353
commit 276f996af9
caused PAGE_LAST_INSERT
to be set to something nonzero by the function page_copy_rec_list_end().
This in turn would cause btr_page_get_split_rec_to_right() to behave
differently: we would not attempt to split the page at all, but simply
insert the new record into the new, empty, right leaf page.
Even though the change reduced the sizes of some tables, it is better
to aim for balanced trees.
page_copy_rec_list_end(), PageBulk::finishPage():
Preserve PAGE_LAST_INSERT, PAGE_N_DIRECTION, PAGE_DIRECTION.
PageBulk::finish(): Move some common code from PageBulk::finishPage().
55 lines
1.7 KiB
Text
55 lines
1.7 KiB
Text
#
|
|
# Bug#15923864 (Bug#67718):
|
|
# INNODB DRASTICALLY UNDER-FILLS PAGES IN CERTAIN CONDITIONS
|
|
#
|
|
SET GLOBAL innodb_file_per_table=ON;
|
|
CREATE TABLE t1 (a BIGINT PRIMARY KEY, b VARCHAR(4096)) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (0, REPEAT('a', 4096));
|
|
INSERT INTO t1 VALUES (1000, REPEAT('a', 4096));
|
|
INSERT INTO t1 VALUES (1001, REPEAT('a', 4096));
|
|
INSERT INTO t1 VALUES (1002, REPEAT('a', 4096));
|
|
INSERT INTO t1 VALUES (1, REPEAT('a', 4096));
|
|
INSERT INTO t1 VALUES (2, REPEAT('a', 4096));
|
|
SELECT page_number, number_records
|
|
FROM information_schema.innodb_sys_tablespaces s1,
|
|
information_schema.innodb_buffer_page s2
|
|
WHERE s1.space = s2.space AND name = 'test/t1'
|
|
AND page_type = "INDEX" ORDER BY page_number;
|
|
page_number number_records
|
|
3 2
|
|
4 3
|
|
5 3
|
|
INSERT INTO t1 VALUES (999, REPEAT('a', 4096));
|
|
SELECT page_number, number_records
|
|
FROM information_schema.innodb_sys_tablespaces s1,
|
|
information_schema.innodb_buffer_page s2
|
|
WHERE s1.space = s2.space AND name = 'test/t1'
|
|
AND page_type = "INDEX" ORDER BY page_number;
|
|
page_number number_records
|
|
3 3
|
|
4 3
|
|
5 3
|
|
6 1
|
|
INSERT INTO t1 VALUES (998, REPEAT('a', 4096));
|
|
SELECT page_number, number_records
|
|
FROM information_schema.innodb_sys_tablespaces s1,
|
|
information_schema.innodb_buffer_page s2
|
|
WHERE s1.space = s2.space AND name = 'test/t1'
|
|
AND page_type = "INDEX" ORDER BY page_number;
|
|
page_number number_records
|
|
3 3
|
|
4 3
|
|
5 3
|
|
6 2
|
|
INSERT INTO t1 VALUES (997, REPEAT('a', 4096));
|
|
SELECT page_number, number_records
|
|
FROM information_schema.innodb_sys_tablespaces s1,
|
|
information_schema.innodb_buffer_page s2
|
|
WHERE s1.space = s2.space AND name = 'test/t1'
|
|
AND page_type = "INDEX" ORDER BY page_number;
|
|
page_number number_records
|
|
3 3
|
|
4 3
|
|
5 3
|
|
6 3
|
|
DROP TABLE t1;
|