MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Victoria Reznichenko Date:November 26 2003 10:40am
Subject:Re: IN clause trouble
View as plain text  
"Kate Porter" <kate@stripped> wrote:
> I am using 4.0.15 on RedHat 7.3 and ran it to a strangest problem today.
> 
> SELECT col FROM table WHERE site_id=123;
> returns a list  of data.
> 
> SELECT col FROM table WHERE site_id IN(123);
> returns an empty set.
> 
> Upon further investigation, I found cases when the IN() syntax gets a
> smaller subset of the data.
> 
> e.g.  SELECT day FROM table WHERE site_id IN(123);
> gets me data up to 2003-03-23, whereas the other form of the query has data
> going all the way through current.
> 
> I've been using the IN syntax quite a bit and never noticed a problem
> before.  For those cases when you expect a list of values, this is a very
> convenient syntax.  I still feel like there is something obvious I am not
> seeing.
> Or is this a bug?

Could you create a repeatable test case?

> Table corruption?

Use CHECK TABLE command to check table for errors:
	http://www.mysql.com/doc/en/CHECK_TABLE.html

> Only this is happenning
> across multiple tables (various summaries).


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




Thread
IN clause troubleKate Porter26 Nov
  • Re: IN clause troubleVictoria Reznichenko26 Nov