[MDEV-29978] Corruption errors upon CHECK on temporary InnoDB table Created: 2022-11-08  Updated: 2022-11-24  Resolved: 2022-11-14

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Temporary, Storage Engine - InnoDB
Affects Version/s: 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.11.2, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3

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

Issue Links:
Blocks
Problem/Incident
is caused by MDEV-24402 CHECK TABLE may miss some cases of in... Closed

 Description   

--source include/have_innodb.inc
 
CREATE TEMPORARY TABLE t (f INT, UNIQUE(f)) ENGINE=InnoDB;
INSERT INTO t (f) VALUES (1),(2);
CHECK TABLE t;
 
# Cleanup
DROP TABLE t;

10.6 c4ce012e

CHECK TABLE t;
Table	Op	Msg_type	Msg_text
test.t	check	Warning	InnoDB: Invalid PAGE_MAX_TRX_ID=0 in index 'f'
test.t	check	Warning	InnoDB: Invalid PAGE_MAX_TRX_ID=0 in index 'f'
test.t	check	Warning	InnoDB: The B-tree of index f is corrupted.
test.t	check	Warning	InnoDB: Index 'f' contains 0 entries, should be 2.
test.t	check	error	Corrupt
DROP TABLE t;
bug.15453 'innodb'                       [ fail ]  Found warnings/errors in server log file!
        Test ended at 2022-11-08 16:59:22
line
2022-11-08 16:59:21 4 [ERROR] InnoDB: Unable to flag corruption of `f` in table `mysqld.1`.`#sql-temptable-2a260c-4-f` in CHECK TABLE-check index

The errors started showing up after

commit ab0190101b0587e0e03b2d75a967050b9a85fd1b
Author: Marko Mäkelä
Date:   Fri Oct 21 10:02:54 2022 +0300
 
    MDEV-24402: InnoDB CHECK TABLE ... EXTENDED



 Comments   
Comment by Marko Mäkelä [ 2022-11-14 ]

Sorry, this was badly broken by MDEV-24402. For TEMPORARY TABLE we must use the READ UNCOMMITTED isolation level and count records if and only if they are not delete-marked.

Generated at Thu Feb 08 10:12:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.