[MDEV-27347] MyISAM/Aria table is marked as crashed upon updating NULL values in DESC index Created: 2021-12-23  Updated: 2022-01-26  Resolved: 2022-01-26

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: N/A
Fix Version/s: 10.8.1

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-13756 Implement descending index: KEY (a DE... Closed
Relates
relates to MDEV-27340 NULL gets lost (becomes empty string)... Closed

 Description   

May be related to MDEV-27340

create table t1 (c char(10), key(c desc)) engine=MyISAM;
insert into t1 values (null),(null);
update t1 set c='foo';

preview-10.8-MDEV-13756-desc-indexes 3027d0d7

MariaDB [test]> create table t1 (c char(10), key(c desc)) engine=MyISAM;
Query OK, 0 rows affected (0.015 sec)
 
MariaDB [test]> insert into t1 values (null),(null);
Query OK, 2 rows affected (0.001 sec)
Records: 2  Duplicates: 0  Warnings: 0
 
MariaDB [test]> update t1 set c='foo';
ERROR 126 (HY000): Index for table './test/t1.MYI' is corrupt; try to repair it
MariaDB [test]> check table t1;
+---------+-------+----------+---------------------------------------------------------+
| Table   | Op    | Msg_type | Msg_text                                                |
+---------+-------+----------+---------------------------------------------------------+
| test.t1 | check | warning  | Table is marked as crashed                              |
| test.t1 | check | error    | Checksum for key:  1 doesn't match checksum for records |
| test.t1 | check | error    | Corrupt                                                 |
+---------+-------+----------+---------------------------------------------------------+
3 rows in set (0.001 sec)

Also reproducible with Aria.



 Comments   
Comment by Sergei Golubchik [ 2021-12-25 ]

no longer repeatable. likely fixed in MDEV-27340

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