[MDEV-27162] "ERROR 126 (HY000): Index for table #sometemptable#.MYI is corrupt" on key_cache_segments variation Created: 2021-12-03  Updated: 2021-12-03  Resolved: 2021-12-03

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Temporary, Optimizer, Storage Engine - MyISAM
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Sergei Petrunia
Resolution: Duplicate Votes: 0
Labels: corruption

Issue Links:
Duplicate
duplicates MDEV-26492 Got error 126 / mysqld: Index for tab... Confirmed

 Description   

CREATE TEMPORARY TABLE t (a INT PRIMARY KEY) ENGINE=MyISAM;
SET GLOBAL key_cache_segments=2;
INSERT INTO t VALUES (0);
SET GLOBAL key_cache_segments=1;
SELECT a FROM t WHERE MATCH (a) AGAINST ('' IN BOOLEAN MODE);

Leads to:

10.8.0 bc57ff7cf79504a198d4752b4748340a4afd886c (Optimized)

10.8.0-opt>SELECT a FROM t WHERE MATCH (a) AGAINST ('' IN BOOLEAN MODE);
ERROR 126 (HY000): Index for table 'riadb-10.8.0-linux-x86_64-opt/data/#sql-temptable-2d0059-4-0.MYI' is corrupt; try to repair it

10.8.0 bc57ff7cf79504a198d4752b4748340a4afd886c (Optimized)

2021-12-03 21:41:59 4 [ERROR] mysqld: Index for table 'riadb-10.8.0-linux-x86_64-opt/data/#sql-temptable-2d0059-4-0.MYI' is corrupt; try to repair it
2021-12-03 21:41:59 4 [ERROR] Got error 126 when reading table '/test/MD121121-mariadb-10.8.0-linux-x86_64-opt/data/#sql-temptable-2d0059-4-0'
2021-12-03 21:41:59 4 [ERROR] mysqld: Index for table 't' is corrupt; try to repair it

Bug confirmed present in:
MariaDB: 10.2.42 (dbg), 10.2.42 (opt), 10.3.33 (dbg), 10.3.33 (opt), 10.4.23 (dbg), 10.4.23 (opt), 10.5.14 (dbg), 10.5.14 (opt), 10.6.6 (dbg), 10.6.6 (opt), 10.7.2 (dbg), 10.7.2 (opt), 10.8.0 (dbg), 10.8.0 (opt)

Confirmed not present in (the variable key_cache_segments does not exist in MySQL):
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.36 (dbg), 5.7.36 (opt), 8.0.27 (dbg), 8.0.27 (opt)


Generated at Thu Feb 08 09:50:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.