Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.5, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
Description
CHECK TABLE fails to validate the info_bits of records. Specifically, if you run it on a table that was corrupted due to MDEV-19916, it would fail to notice that the leaf level of the clustered index starts with a record where the 'minimum record mark' of info_bits is set. This can be repeated by running a debug build of MariaDB 10.3.16 and earlier, and then upgrading to a newer non-debug build in the middle of the test:
--source include/have_innodb.inc
|
--source include/have_debug.inc
|
|
--echo #
|
--echo # MDEV-19916 Corruption after instant ADD/DROP and shrinking the tree
|
--echo #
|
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; |
|
# Create an index tree with 2 levels of node pointer pages. |
|
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 GLOBAL innodb_defragment = 1; |
OPTIMIZE TABLE t1; |
--source include/restart_mysqld.inc
|
# restart with a newer MariaDB 10.3 |
CHECK TABLE t1; |
Note: Please ignore debug assertion failures; we are interested in what the non-debug server does.
Attachments
Issue Links
- relates to
-
MDEV-22867 Assertion `instant.n_core_fields == n_core_fields' failed in dict_index_t::instant_add_field
- Closed
-
MDEV-19783 Random crashes and corrupt data in INSTANT-added columns
- Closed
-
MDEV-19916 Corruption after instant ADD/DROP and shrinking the index tree
- Closed