[MDEV-18952] CHECK TABLE should use READ UNCOMMITED if innodb_force_recovery>=5 Created: 2019-03-17  Updated: 2021-06-09  Resolved: 2019-03-17

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.3.6, 10.4.0
Fix Version/s: 10.3.14, 10.4.4

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-17742 innodb.ibuf_not_empty failed in build... Closed
Problem/Incident
is caused by MDEV-15132 Avoid accessing the TRX_SYS page Closed
Relates
relates to MDEV-15418 innodb_force_recovery=5 displays bogu... Closed
relates to MDEV-18936 Purge thread fails to exit on shutdown Closed
relates to MDEV-25886 CHECK TABLE crashes due to DB_MISSING... Closed

 Description   

MDEV-15418 changed InnoDB to use the READ UNCOMMITTED isolation level when the transaction recovery is disabled by setting innodb_force_recovery to 5 or 6. Alas, CHECK TABLE would still internally use REPEATABLE READ. After merging the MDEV-18936 fix, this would cause a crash in the test innodb.ibuf_not_empty:

CURRENT_TEST: innodb.ibuf_not_empty
mysqltest: At line 50: query 'check table t1' failed: 2013: Lost connection to MySQL server during query
Version: '10.3.14-MariaDB-debug-log'  socket: '/dev/shm/10.3/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
2019-03-17 12:48:06 3 [ERROR] InnoDB: Failed to find tablespace for table `test`.`t1` in the cache. Attempting to load the tablespace with space id 5
2019-03-17 12:48:06 3 [Warning] InnoDB: Allocated tablespace ID 5 for test/t1, old maximum was 0
2019-03-17 12:48:06 3 [Warning] InnoDB: A transaction id in a record of table `test`.`t1` is newer than the system-wide maximum.
mysqld: /mariadb/10.3/storage/innobase/trx/trx0sys.cc:62: static void ReadView::check_trx_id_sanity(trx_id_t, const table_name_t &): Assertion `0' failed.


Generated at Thu Feb 08 08:47:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.