diff options
author | Sinisa@sinisa.nasamreza.org <> | 2002-12-24 14:33:11 +0200 |
---|---|---|
committer | Sinisa@sinisa.nasamreza.org <> | 2002-12-24 14:33:11 +0200 |
commit | 5c0bd57b8fd974e3ae34685da46a52f9399d337d (patch) | |
tree | 9970b0a50ab943bf9e955f1831290b932043417f /mysql-test | |
parent | ad9c7c7bdbf4f126c323def318159cbc75ed1afc (diff) | |
download | mariadb-git-5c0bd57b8fd974e3ae34685da46a52f9399d337d.tar.gz |
fix for an error in the merge from 3.23
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/case.result | 5 | ||||
-rw-r--r-- | mysql-test/t/case.test | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 183e2692d7a..e5fc7218c50 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -63,7 +63,12 @@ nothing 2 one 1 two 1 drop table t1; +drop table if exists t1; +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; color orange yellow green +drop table if exists t1; diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index f2b8d42e07c..b5a1a60f15b 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -30,8 +30,8 @@ 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 t; +drop table if exists t1; 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 t; +drop table if exists t1; |