diff options
author | unknown <ramil@mysql.com> | 2006-03-06 16:38:35 +0400 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2006-03-06 16:38:35 +0400 |
commit | f372641876e7a560ce661693bfc5d8e62cc5a19d (patch) | |
tree | 5665bf9d1cfd10c122d62ffc42b4876d2a4f15c9 /mysql-test/r/case.result | |
parent | 4391f938922a7f62831481c350ad4a680c64c827 (diff) | |
download | mariadb-git-f372641876e7a560ce661693bfc5d8e62cc5a19d.tar.gz |
Fix for bug #17896: MIN of CASE WHEN returns non-minimum value!
sql/item_cmpfunc.cc:
Fix for bug #17896: MIN of CASE WHEN returns non-minimum value!
- NULL items should not affect the result type.
Diffstat (limited to 'mysql-test/r/case.result')
-rw-r--r-- | mysql-test/r/case.result | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index fb0bc19a67e..a5495d0fc3e 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -169,3 +169,11 @@ SELECT CASE '1' WHEN '2' THEN 'BUG' ELSE 'nobug' END; case+union+test case+union+test nobug +create table t1(a float, b int default 3); +insert into t1 (a) values (2), (11), (8); +select min(a), min(case when 1=1 then a else NULL end), +min(case when 1!=1 then NULL else a end) +from t1 where b=3 group by b; +min(a) min(case when 1=1 then a else NULL end) min(case when 1!=1 then NULL else a end) +2 2 2 +drop table t1; |