List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:January 31 2004 12:09am
Subject:Re: ORDER BY may remove result rows
View as plain text  
In the last episode (Jan 30), lknecht@stripped 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@stripped
Thread
ORDER BY may remove result rowslknecht30 Jan
  • Re: ORDER BY may remove result rowsDan Nelson31 Jan
  • Re: ORDER BY may remove result rowsVictoria Reznichenko2 Feb