Annoying bug in MYSQL 5.0.51b

Just realized that in MYSQL 5.0.51b, sorting data from INNODB on primary key with where clause will NOT work.

See other bug report at http://bugs.mysql.com/bug.php?id=31001

Basically, if you use where clause in the query like this. The primary won't sort.

SELECT * FROM (`store`) WHERE `publisher_id` = 1006 ORDER BY `store_id` desc
In the query, store_id is the primary key in the innodb.

If you remove the where clause, it will sort correctly.

WTF! This is a critical bug. How come MySQL don't catch that at first place. This bug seem to be there for a long time.
Post a Comment