Bug #94459 ORDER BY DESC + LIMIT x,1 on same columns' values are wrong
Submitted: 25 Feb 2019 8:14 Modified: 25 Feb 2019 16:26
Reporter: Angel Tsvetkov Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7 (10.2.22) OS:Any
Assigned to: CPU Architecture:Any

[25 Feb 2019 8:14] Angel Tsvetkov
Description:
ASC is correct:
select ID from GAMES order by RateUp АSC limit 0,1
=>ID=1
select ID from GAMES order by RateUp АSC limit 1,1
=>ID=3

DESC is wrong (#2):
select ID from GAMES order by RateUp DESC limit 0,1
=>ID=3 (correct)
select ID from GAMES order by RateUp DESC limit 1,1
=>ID=3 (wrong: must be ID=1 but it isn't)

How to repeat:
Table with two columns ID and RateUp
ID=1,RateUp=0
ID=3,RateUp=0

Suggested fix:
No fix
[25 Feb 2019 13:29] MySQL Verification Team
Hi,

Thank you for your bug report.

It would be nice to know which version do you use, since "5" means nothing. Hence, try 5.7.25 and let us know if you still get wrong results.

If you do get wrong results, then send us the precise CREATE TABLE for the table in question and the data that would exhibit the behaviour.
[25 Feb 2019 15:25] Angel Tsvetkov
version
[25 Feb 2019 16:18] MySQL Verification Team
Hi,

Beside version, we need release too.

You also have not provided CREATE TABLE statement and INSERT statements for the reproduction of the problems that you are reporting.
[25 Feb 2019 16:26] MySQL Verification Team
Hi,

Sorry, but from your version it seems that you are using MariaDB.

We do not support nor do we accept bug reports for that product.