[EMAIL PROTECTED] wrote:
>>Description:
> Instead of ordering rows, ORDER BY may remove rows
>>How-To-Repeat:
> CREATE TABLE T (
>  Id INTEGER NOT NULL,
>  Id2 INTEGER NOT NULL,
>  Val FLOAT NOT NULL,
>  Id3 INTEGER NOT NULL,
>  KEY Key2 (Id2, Val),
>  KEY Key3 (Id3)
> );
> 
> INSERT INTO T VALUES(1,3,-12,4);
> INSERT INTO T VALUES(2,2,-27.5,4);
> INSERT INTO T VALUES(3,2,18.4,3);
> 
> mysql> SELECT Id3 FROM T WHERE Id2=2 AND Val BETWEEN -30 AND 20;
> +-----+
> | Id3 |
> +-----+
> |   4 |
> |   3 |
> +-----+
> 2 rows in set (0.00 sec)
> 
> mysql> SELECT Id3 FROM T WHERE Id2=2 AND Val BETWEEN -30 AND 20 ORDER BY Id3;
> +-----+
> | Id3 |
> +-----+
> |   3 |
> +-----+
> 1 row in set (0.01 sec)
> 
> Note: both indices Key2 and Key3 must be present for the bug to occur.
> 

This bug is entered to the bug database:
        http://bugs.mysql.com/bug.php?id=2419

Not fixed yet.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to