Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2.31
Description
Looks as if some cases of InnoDB index inconsistencies – see e.g. MDEV-22373 – are missed by CHECK TABLE.
InnoDB currently ignores any other CHECK TABLE attributes than QUICK (which will suppress the time-consuming checks of the upper levels of the index trees).
Most importantly, InnoDB is ignoring the attribute EXTENDED, and is essentially only performing a MVCC COUNT(*) in each index. A verified case exists where the record counts in the indexes would match, yet the records do not match between the indexes. A true EXTENDED check should report any mismatch between the clustered index (primary key) and the secondary index records.
Note: By the design of InnoDB MVCC (see MDEV-17598 for some discussion), secondary indexes may contain multiple copies of a record, while in the clustered index the multiple versions are formed via a singly-linked list that the undo log pages are part of.
An extremely extended test would have to check that in any possible read view, the secondary indexes match the clustered index, instead of only checking the current read view.
It may turn out that only a special ‘locking’ variant of CHECK TABLE would be able to detect truly any type of mismatch.
Attachments
Issue Links
- blocks
-
MDEV-28349 Provide "crash safe" options for CHECK TABLE and ALTER TABLE ... CHECK PARTITION ...
- Open
- causes
-
MDEV-29886 Assertion `!index->table->is_temporary()' failed in trx_undo_prev_version_build upon CHECK
- Closed
-
MDEV-29978 Corruption errors upon CHECK on temporary InnoDB table
- Closed
-
MDEV-35227 Executing CHECK TABLE...EXTENDED right after server startup may attempt to access too old history
- Confirmed
- relates to
-
MDEV-25459 MVCC read from index on CHAR or VARCHAR wrongly omits rows
- Closed
-
MDEV-29593 Purge misses a chance to free not-yet-reused undo pages
- Closed
-
MDEV-29666 InnoDB fails to purge secondary index records when indexed virtual columns exist
- Closed
-
MDEV-29823 Secondary index records may never be purged after rollback
- Confirmed
-
MDEV-9663 InnoDB assertion failure: *cursor->index->name == TEMP_INDEX_PREFIX, or !cursor->index->is_committed()
- Closed
-
MDEV-11802 innodb.innodb_bug14676111 fails in buildbot due to InnoDB purge failing to start when there is work to do
- Closed
-
MDEV-22373 Unable to find a record to delete-mark ends up crashing mysqld process after upgrading from 10.1.43 to 10.4
- Closed
-
MDEV-29954 Unique hash key on column prefix is computed incorrectly
- Closed
-
MDEV-30129 MySQL 5.7 --> MariaDB 10.8 switch: mysqlcheck --check --extended hangs on table
- Closed