mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
5.2 merge
This commit is contained in:
@@ -1604,6 +1604,38 @@ EXECUTE prep_stmt;
|
||||
f
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#13068506 - QUERY WITH GROUP BY ON NON-AGGR COLUMN RETURNS
|
||||
# WRONG RESULT
|
||||
#
|
||||
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);
|
||||
|
||||
SELECT (
|
||||
SELECT MAX( t2.i2 )
|
||||
FROM t3 RIGHT JOIN t2 ON ( t2.i3 = 2 )
|
||||
WHERE t2.i3 <> t1.i1
|
||||
) AS field1
|
||||
FROM t1;;
|
||||
field1
|
||||
20
|
||||
20
|
||||
|
||||
SELECT (
|
||||
SELECT MAX( t2.i2 )
|
||||
FROM t3 RIGHT JOIN t2 ON ( t2.i3 = 2 )
|
||||
WHERE t2.i3 <> t1.i1
|
||||
) AS field1
|
||||
FROM t1 GROUP BY field1;;
|
||||
field1
|
||||
20
|
||||
|
||||
drop table t1,t2,t3;
|
||||
# End of test for Bug#13068506
|
||||
End of 5.1 tests
|
||||
#
|
||||
# LP BUG#994392: Wrong result with RIGHT/LEFT JOIN and ALL subquery
|
||||
|
Reference in New Issue
Block a user