two subqueries with "and"

two subqueries with "and"

am 17.02.2004 09:08:21 von Andreas Pardeike

The following can be piped into 'mysql test' and will give
back '10' instead of the correct '2':


drop table if exists t;
create table t (val tinyint);
insert into t values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20);
select count(*) from t as t1 where t1.val in (select t2.val from t as
t2 where t2.val in (4,6,8)) and t1.val in (select t3.val from t as t3
where t3.val in (6,8,10));


Version info: 4.1.1-alpha-standard on RedHat 9, double processor

Regards,
Andreas Pardeike


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: two subqueries with "and"

am 17.02.2004 15:19:21 von Sinisa Milivojevic

Andreas Pardeike writes:
> The following can be piped into 'mysql test' and will give
> back '10' instead of the correct '2':
>
>
> drop table if exists t;
> create table t (val tinyint);
> insert into t values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20);
> select count(*) from t as t1 where t1.val in (select t2.val from t as
> t2 where t2.val in (4,6,8)) and t1.val in (select t3.val from t as t3
> where t3.val in (6,8,10));
>
>
> Version info: 4.1.1-alpha-standard on RedHat 9, double processor
>
> Regards,
> Andreas Pardeike

Hi!

It is in the bugs database now. Bug number #2838

Bugs db is at:

http://bugs.mysql.com

--

Sincerely,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB
/_/ /_/\_, /___/\___\_\___/ Full time Developer and Support Coordinator
<___/ www.mysql.com Larnaca, Cyprus

Meet the MySQL at User Conference ! (April 14-16, 2004)
http://www.mysql.com/uc2004/


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org