diff options
author | unknown <monty@mashka.mysql.fi> | 2003-01-04 15:40:55 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-01-04 15:40:55 +0200 |
commit | 70840aeda0d557ce3ac77516cc8e46ccc70fa3b4 (patch) | |
tree | 49da2620373e1b4c73d505405819d5d7097786bc /mysql-test/t/case.test | |
parent | 31f4e05bb90c60da9426028129f31ac3b5d7b9f4 (diff) | |
parent | 30c1134467d700192c8e2b12c8a3bc04334b4fa5 (diff) | |
download | mariadb-git-70840aeda0d557ce3ac77516cc8e46ccc70fa3b4.tar.gz |
merge
BitKeeper/etc/logging_ok:
auto-union
include/mysql.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/r/multi_update.result:
Auto merged
mysql-test/t/multi_update.test:
Auto merged
mysys/Makefile.am:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/share/italian/errmsg.txt:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'mysql-test/t/case.test')
-rw-r--r-- | mysql-test/t/case.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/case.test b/mysql-test/t/case.test index 79511f5f546..3ba3a292c77 100644 --- a/mysql-test/t/case.test +++ b/mysql-test/t/case.test @@ -30,3 +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; + +# +# 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 t1; |