[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql
Subject:    Re: ORDER BY may remove result rows
From:       Dan Nelson <dnelson () allantgroup ! com>
Date:       2004-01-31 0:09:16
Message-ID: 20040131000916.GB4260 () dan ! emsphone ! com
[Download RAW message or body]

In the last episode (Jan 30), lknecht@eragen.com said:
> >Description:
> Instead of ordering rows, ORDER BY may remove rows
... 
> 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.

I see this too.  Even more fun:

mysql> SELECT Id3 FROM T WHERE Id2=2 AND Val BETWEEN -30 AND 20 ORDER BY Id3 DESC; 
Empty set (0.00 sec)

-- 
	Dan Nelson
	dnelson@allantgroup.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=mysql@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic