1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-19916 Corruption after instant ADD/DROP and shrinking the tree

btr_lift_page_up(): Correct the incorrect condition.

page_validate(): Validate the page type.
This commit is contained in:
Marko Mäkelä
2019-07-01 18:24:54 +03:00
parent 92bbf4f53d
commit 0e1ba364a1
3 changed files with 54 additions and 1 deletions

View File

@ -236,4 +236,31 @@ a b c d
1 2 NULL 1
2 3 4 1
DROP TABLE t1;
#
# MDEV-19916 Corruption after instant ADD/DROP and shrinking the tree
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
SET @old_limit = @@innodb_limit_optimistic_insert_debug;
SET GLOBAL innodb_limit_optimistic_insert_debug = 2;
INSERT INTO t1 VALUES (1),(5),(4),(3),(2);
SET GLOBAL innodb_limit_optimistic_insert_debug = @old_limit;
ALTER TABLE t1 ADD COLUMN b INT, ALGORITHM=INSTANT;
SET @old_defragment = @@innodb_defragment;
SET GLOBAL innodb_defragment = 1;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
SET GLOBAL innodb_defragment = @old_defragment;
ALTER TABLE t1 ADD vb INT AS (b) VIRTUAL;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
SELECT * FROM t1;
a b vb
1 NULL NULL
2 NULL NULL
3 NULL NULL
4 NULL NULL
5 NULL NULL
DROP TABLE t1;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;