[MDEV-27586] Auto-increment does not work with DESC on MERGE table Created: 2022-01-23  Updated: 2022-01-26  Resolved: 2022-01-26

Status: Closed
Project: MariaDB Server
Component/s: Server, Storage Engine - MyISAM
Affects Version/s: N/A
Fix Version/s: 10.8.1

Type: Bug Priority: Major
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

 Description   

create table t (a int not null, primary key(a desc)) engine=MyISAM;
create table tm (a int not null auto_increment, primary key(a desc)) engine=MERGE union=(t) insert_method=FIRST;
 
insert into tm () values ();
insert into tm () values ();
insert into tm () values ();
 
drop table tm, t;

The third INSERT above fails with

preview-10.8-MDEV-13756-desc-indexes c10e10c6

At line 6: query 'insert into tm () values ()' failed: ER_DUP_ENTRY (1062): Duplicate entry '2' for key 'PRIMARY'

Not reproducible with an ascending key.


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