diff options
author | Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com> | 2013-01-11 06:36:53 +0530 |
---|---|---|
committer | Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com> | 2013-01-11 06:36:53 +0530 |
commit | cb72ecbe2c6e987fc5977546343e52ca5fc487ce (patch) | |
tree | e6cfe7ffecafdab07f7e02df5dc80b20695337a2 /mysql-test/t/join_outer.test | |
parent | 3fa76fd05de0a72719d08cba1af4130059bb7bc7 (diff) | |
parent | 8b41f491c82063382bc76d8a8c266b83b0ab8fe0 (diff) | |
download | mariadb-git-cb72ecbe2c6e987fc5977546343e52ca5fc487ce.tar.gz |
Merge from 5.1 to 5.5
Diffstat (limited to 'mysql-test/t/join_outer.test')
-rw-r--r-- | mysql-test/t/join_outer.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index 9da793e699f..ef5e027e732 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -1272,5 +1272,35 @@ EXECUTE prep_stmt; DROP TABLE t1; +--echo # +--echo # Bug#13068506 - QUERY WITH GROUP BY ON NON-AGGR COLUMN RETURNS +--echo # WRONG RESULT +--echo # + +CREATE TABLE t1 (i1 int); +INSERT INTO t1 VALUES (100), (101); + +CREATE TABLE t2 (i2 int, i3 int); +INSERT INTO t2 VALUES (20,1),(10,2); + +CREATE TABLE t3 (i4 int(11)); +INSERT INTO t3 VALUES (1),(2); + +let $query= SELECT ( + SELECT MAX( t2.i2 ) + FROM t3 RIGHT JOIN t2 ON ( t2.i3 = 2 ) + WHERE t2.i3 <> t1.i1 +) AS field1 +FROM t1; + +--echo +--eval $query; +--echo +--eval $query GROUP BY field1; + +--echo +drop table t1,t2,t3; + +--echo # End of test for Bug#13068506 --echo End of 5.1 tests |