two subqueries with 'and'

Andreas Pardeike <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
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/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.