Apr 11 2008
Fix Wordpress returning reversed posts on MySQL 5.0.5x
Many bloggers complained that their posts begin appearing in reversed orders after their webhost upgraded to MySQL 5.0.5x. This is caused by a bug in the MySQL database server affecting versions 5.0.50, 5.0.51 and 5.0.51a (MySQL Bug #30596).
The bug can be reproduced by any SQL Select command that couples both GROUP BY and ORDER BY clauses and does not affect Wordpress alone.
The work around for this problem is outlined below: