Re: Disorder result using ORDER BY with ENUM, INT
Sergei Golubchik <[email protected]>
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi! On Nov 26, Kriengkrai J. wrote: > -- System: MySQL 4.0.13, 4.0.16 on Linux x86 > -- Table type: MyISAM, InnoDB > -- Description / How-To-Repeat: > -- 1. When I use > -- SELECT id, type FROM test.report ORDER BY type, id; > -- the result is in wrong order > -- -- > -- +----+---------+ > -- | id | type | > -- +----+---------+ > -- | 4 | general | > -- | 3 | general | > -- | 1 | general | > -- | 2 | general | > -- | 5 | inhouse | > -- | 6 | inhouse | > -- .. > -- -- > -- 2. But when I use > -- SELECT id, type FROM test.report ORDER BY type AND id; > -- the result is in right order > -- -- > -- +----+---------+ > -- | id | type | > -- +----+---------+ > -- | 1 | general | > -- | 2 | general | > -- | 3 | general | > -- | 4 | general | > -- | 5 | inhouse | > -- | 6 | inhouse | > -- .. > -- 3. After running statement(2) I rerun statement(1) again and the > result is then in order as (2). I cannot repeat this behavour on your test data. Regards, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <[email protected]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany <___/ www.mysql.com -- MySQL Bugs Mailing List For list archives: http://lists.mysql.com/bugs To unsubscribe: http://lists.mysql.com/[email protected]