[MDEV-21036] Wrong result upon selecting from sequence engine table with ORDER BY Created: 2019-11-12  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - Sequence
Affects Version/s: 10.1, 10.2.29, 10.5.13, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Sergii Volikov Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None
Environment:

WINDOWS Server 2012 R2



 Description   

SELECT seq FROM seq_1_to_1 WHERE seq <= 1 ORDER BY seq;

return 1 rows

SELECT seq FROM seq_1_to_1 WHERE seq <= 1 ORDER BY seq DESC;

return 0 rows!!!



 Comments   
Comment by Elena Stepanova [ 2019-11-12 ]

Thanks for the report. Reproducible as described on all of 10.1-10.5.

Comment by Alice Sherepa [ 2022-12-05 ]

still reproducible:

SELECT seq FROM seq_1_to_2 WHERE seq <= 2 ORDER BY seq;
seq
1
2
SELECT seq FROM seq_1_to_2 WHERE seq <= 2 ORDER BY seq DESC;
seq
1

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