mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
Fix for bug #2629 NULLIF() doesn't behave as described in manual
This commit is contained in:
parent
bb30549439
commit
5adbc611dd
3 changed files with 15 additions and 3 deletions
|
|
@ -40,6 +40,12 @@ a
|
|||
aa
|
||||
aaa
|
||||
drop table t1;
|
||||
select NULLIF(NULL,NULL), NULLIF(NULL,1), NULLIF(NULL,1.0), NULLIF(NULL,"test");
|
||||
NULLIF(NULL,NULL) NULLIF(NULL,1) NULLIF(NULL,1.0) NULLIF(NULL,"test")
|
||||
NULL NULL NULL NULL
|
||||
select NULLIF(1,NULL), NULLIF(1.0, NULL), NULLIF("test", NULL);
|
||||
NULLIF(1,NULL) NULLIF(1.0, NULL) NULLIF("test", NULL)
|
||||
1 1.0 test
|
||||
create table t1 (num double(12,2));
|
||||
insert into t1 values (144.54);
|
||||
select sum(if(num is null,0.00,num)) from t1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue