diff options
author | unknown <sergefp@mysql.com> | 2006-08-24 19:14:36 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2006-08-24 19:14:36 +0400 |
commit | c74c8195330ff1e7b3274f6c78d968bf026e5037 (patch) | |
tree | 6b29b41583369e101d9f700f11242eda782d1e05 /mysql-test/r | |
parent | 9907e970aea28ce186e110084c3a4f2d6ac0c602 (diff) | |
download | mariadb-git-c74c8195330ff1e7b3274f6c78d968bf026e5037.tar.gz |
Bug #16255: Subquery in WHERE (the cset by Georgi Kodinov)
Must not use Item_direct_ref in HAVING because it points to
the new value (witch is not yet calculated for the first row).
mysql-test/r/subselect.result:
Bug #16255: Subquery in where
- test case
mysql-test/t/subselect.test:
Bug #16255: Subquery in where
- test case
sql/item_subselect.cc:
Bug #16255: Subquery in where
Must not use Item_direct_ref in HAVING because it points to
the new value (witch is not yet calculated for the first row).
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/subselect.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 983ad628425..e84c3957760 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -2895,3 +2895,14 @@ select * from t1 where NOT(s1 = ALL (select s1/s1 from t1)); s1 2 drop table t1; +CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b)); +INSERT INTO t1 VALUES(26, 1), (48, 2); +SELECT * FROM t1 r WHERE (r.a,r.b) IN (SELECT a,MAX(b) FROM t1 GROUP BY a); +a b +26 1 +48 2 +SELECT * FROM t1 r WHERE (r.a,r.b) IN (SELECT a + 0,MAX(b) FROM t1 GROUP BY a); +a b +26 1 +48 2 +DROP TABLE t1; |