From 0a5338614a1d4a4edde88c24b55c4879332f7e4d Mon Sep 17 00:00:00 2001 From: "monty@mashka.mysql.fi" <> Date: Thu, 26 Dec 2002 15:55:22 +0200 Subject: Test cleanup --- mysql-test/t/case.test | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mysql-test/t/case.test') diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index b5a1a60f15b..3ba3a292c77 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -30,8 +30,12 @@ insert into t1 values(1),(2),(3),(4); select case a when 1 then 2 when 2 then 3 else 0 end as fcase, count(*) from t1 group by fcase; select case a when 1 then "one" when 2 then "two" else "nothing" end as fcase, count(*) from t1 group by fcase; drop table t1; -drop table if exists t1; + +# +# Test MAX(CASE ... ) that can return null +# + create table t1 (row int not null, col int not null, val varchar(255) not null); insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small'); select max(case col when 1 then val else null end) as color from t1 group by row; -drop table if exists t1; +drop table t1; -- cgit v1.2.1