Hello,
After upgrading H2 from 2.2.224 to 2.3.232, we encountered a regression in how order by ... desc works. The following query unexpectedly returns results in ascending order, despite the explicit order by id desc:
create table my_table
(
id number,
primary key (id)
);
create index idx_my_table on my_table (id);
insert into my_table (id) values (0);
insert into my_table (id) values (1);
select * from my_table where id in (0, 1) order by id desc;
results in
instead of
The issue also occurs when replacing the where ... in clause with an or condition:
select * from my_table where id = 0 or id = 1 order by id desc;
The issue does not occur when either the primary key (id) constraint or the index idx_my_table is removed.
Potentially linked to #4079, also present in 2.3.230
Thank you for your amazing work 🙏