mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
subselect.result, subselect.test:
Added a test case for bug #9338. sql_select.cc: Fixed bug #9338. When an occurence of a field reference has to be replaced by another field reference the whole Item_field must be replaced. item.cc: Fixed bug #9338. The method Item_field::replace_equal_field_processor was replaced by Item_field::replace_equal_field. The new method is used to replace the occurences of Item_field objects. item.h: Fixed bug #9338. The virtual function replace_equal_field_processor was replaced by replace_equal_field. The latter is supposed to be used as a callback function in calls of the method transform.
This commit is contained in:
@@ -2746,3 +2746,19 @@ NULL
|
||||
2.00
|
||||
4.00
|
||||
drop table t1;
|
||||
CREATE table t1 ( c1 integer );
|
||||
INSERT INTO t1 VALUES ( 1 );
|
||||
INSERT INTO t1 VALUES ( 2 );
|
||||
INSERT INTO t1 VALUES ( 3 );
|
||||
CREATE TABLE t2 ( c2 integer );
|
||||
INSERT INTO t2 VALUES ( 1 );
|
||||
INSERT INTO t2 VALUES ( 4 );
|
||||
INSERT INTO t2 VALUES ( 5 );
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON c1 = c2 WHERE c2 IN (1);
|
||||
c1 c2
|
||||
1 1
|
||||
SELECT * FROM t1 LEFT JOIN t2 ON c1 = c2
|
||||
WHERE c2 IN ( SELECT c2 FROM t2 WHERE c2 IN ( 1 ) );
|
||||
c1 c2
|
||||
1 1
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
Reference in New Issue
Block a user