diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-03-03 01:37:54 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-03-03 01:37:54 +0200 |
commit | 1acfa942edb72fedcf92dd017ae5fef8694382e5 (patch) | |
tree | 721fcd9a479ce34633659c936f36fa1e20856620 /mysql-test/r/derived.result | |
parent | cc413ce9a368b930aba5e63c0ab013f7b3ab3c04 (diff) | |
parent | 5a0fff50f87e20c4e95a84143a0a3bb67e03e29e (diff) | |
download | mariadb-git-1acfa942edb72fedcf92dd017ae5fef8694382e5.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'mysql-test/r/derived.result')
-rw-r--r-- | mysql-test/r/derived.result | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 0b392305bbf..ce94fe49f5c 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -1014,4 +1014,27 @@ David Yes 210 Edward Yes 150 DROP TABLE example1463; set sql_mode= @save_sql_mode; +# +# MDEV-9028: SELECT DISTINCT constant column of derived table +# used as the second operand of LEFT JOIN +# +create table t1 (id int, data varchar(255)); +insert into t1 values (1,'yes'),(2,'yes'); +select distinct t1.id, tt.id, tt.data +from t1 +left join +(select t1.id, 'yes' as data from t1) as tt +on t1.id = tt.id; +id id data +1 1 yes +2 2 yes +select distinct t1.id, tt.id, tt.data +from t1 +left join +(select t1.id, 'yes' as data from t1 where id > 1) as tt +on t1.id = tt.id; +id id data +2 2 yes +1 NULL NULL +drop table t1; # end of 5.5 |