The sorting and paging in an application did suddenly not work anymore. The data rows was displayed only in ascending sort order.
In case of special queries, which use the combination two where clause, order by DESC and limit, returns MySQL the data rows in ascending instead of descending order.
select * from TEST
where F_ID = 1 and T_STATUS = true
order by T_ID desc
limit 5;
Because not all application on the server where affected by the bug, the error must have the reason else where. Some Tests show then, that this occurs after an import of a backup dump.
Affected in any case are the version 5.1.39 to 5.1.44. Avoid restore from backup dump for this versions if its not absolute neccessary. I already send a bug report [1] to the MySQL team.
Author: Johannes HammoudComments Date: 24.02.2010