Skip to content

Commit a5cf49e

Browse files
committed
Bug#35115601 InnoDB - Page [...] still fixed or dirty crash during
shutdown Post-push test fix Increased size of the table to ensure second call to insert_direct. The second call to insert_direct is required to test the error path in the DDL. Background: Builder::insert_direct calls m_btr_load->latch and m_btr_load->release. The call to release will buffer fix a page. The corresponding call to latch will unfix the above page provided m_n_recs is non-zero. This means that the first call to latch will not do anything. In the first call to insert_direct, latch will do nothing, but release will buffer fix the page. In the second call to insert_direct, the test will simulate an error in the online log and force the DDL to error out. This way the test checks the cleanup code in the DDL. In the bug, this cleanup had missed the latch, causing the page to remain buffer fixed - which was caught at shutdown. Change-Id: I70db8539c42bb4c1761b56cca5dadf814b2c5020
1 parent 22bb026 commit a5cf49e

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

mysql-test/suite/innodb/r/builder_error_case.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CREATE TABLE t1 (c1 INT);
33
# Create big enough table to ensure another call to Builder::insert_direct
44
SELECT COUNT(*) FROM t1;
55
COUNT(*)
6-
10001
6+
11000
77
# Builder::insert_direct returns DB_ONLINE_LOG_TOO_BIG
88
SET DEBUG="+d,builder_insert_direct_trigger_error";
99
ALTER TABLE t1 ADD COLUMN c2 INT DEFAULT 20, ALGORITHM=INPLACE;

mysql-test/suite/innodb/t/builder_error_case.test

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,20 @@ DELIMITER |;
1212
CREATE PROCEDURE populate_t1(IN BASE INT, IN SIZE INT)
1313
BEGIN
1414
DECLARE i INT DEFAULT BASE;
15-
WHILE (i <= SIZE) DO
16-
INSERT INTO t1 values (i);
17-
SET i = i + 1;
15+
WHILE (i + 10 <= SIZE) DO
16+
INSERT INTO t1 values (i), (i+1), (i+2), (i+3), (i+4), (i+5), (i+6), (i+7), (i+8), (i+9);
17+
SET i = i + 10;
1818
END WHILE;
1919
END|
2020
DELIMITER ;|
2121

22-
CALL populate_t1(0, 10000);
22+
# Note that inserting anything less than 10700 doesn't cause key_buffer to
23+
# overflow on 32 bit platforms - this causes a single call to
24+
# Builder::insert_direct. In case of 64 bit platforms, this number is 9892. The
25+
# reason for this difference is because of different values for sizeof the
26+
# Key_sort_buffer::m_dtuples on different architecture. Kept at 11000 just to be
27+
# ensure second call to Builder::insert_direct
28+
CALL populate_t1(0, 11000);
2329
DROP PROCEDURE populate_t1;
2430
--enable_query_log
2531

0 commit comments

Comments
 (0)