mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
test case of bug#5220
This commit is contained in:
@ -106,3 +106,11 @@ a b
|
||||
2 12
|
||||
4 105
|
||||
drop table t1, t2;
|
||||
CREATE TABLE `t1` ( `unit` varchar(50) NOT NULL default '', `ingredient` varchar(50) NOT NULL default '') ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
CREATE TABLE `t2` ( `ingredient` varchar(50) NOT NULL default '', `unit` varchar(50) NOT NULL default '', PRIMARY KEY (ingredient, unit)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1` VALUES ('xx','yy');
|
||||
INSERT INTO `t2` VALUES ('yy','xx');
|
||||
SELECT R.unit, R.ingredient FROM t1 R WHERE R.ingredient IN (SELECT N.ingredient FROM t2 N WHERE N.unit = R.unit);
|
||||
unit ingredient
|
||||
xx yy
|
||||
drop table t1, t2;
|
||||
|
Reference in New Issue
Block a user