You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-5992: fix NULLIF if first param is NULL
This commit is contained in:
committed by
Leonid Fedorov
parent
16904ab97d
commit
1fdeb740c9
@ -97,7 +97,7 @@ c NULL
|
||||
d d
|
||||
SELECT b, NULLIF(b, 15) FROM t1;
|
||||
b NULLIF(b, 15)
|
||||
NULL -2147483648
|
||||
NULL NULL
|
||||
12 12
|
||||
13 13
|
||||
14 14
|
||||
|
9
mysql-test/columnstore/bugfixes/mcol-5992.result
Normal file
9
mysql-test/columnstore/bugfixes/mcol-5992.result
Normal file
@ -0,0 +1,9 @@
|
||||
DROP DATABASE IF EXISTS mcol5992;
|
||||
CREATE DATABASE mcol5992;
|
||||
USE mcol5992;
|
||||
CREATE TABLE `CS_LEG` (`ID` bigint(20) DEFAULT NULL, `sess_count` smallint(6) DEFAULT NULL) ENGINE=Columnstore;
|
||||
insert into CS_LEG(ID) values(1);
|
||||
select NULLIF(sess_count,0) from CS_LEG;
|
||||
NULLIF(sess_count,0)
|
||||
NULL
|
||||
DROP DATABASE mcol5992;
|
16
mysql-test/columnstore/bugfixes/mcol-5992.test
Normal file
16
mysql-test/columnstore/bugfixes/mcol-5992.test
Normal file
@ -0,0 +1,16 @@
|
||||
# MCOL-5992: NULLIF() returns NULL when NULL is the first argument
|
||||
--source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcol5992;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcol5992;
|
||||
USE mcol5992;
|
||||
|
||||
CREATE TABLE `CS_LEG` (`ID` bigint(20) DEFAULT NULL, `sess_count` smallint(6) DEFAULT NULL) ENGINE=Columnstore;
|
||||
|
||||
insert into CS_LEG(ID) values(1);
|
||||
select NULLIF(sess_count,0) from CS_LEG;
|
||||
|
||||
DROP DATABASE mcol5992;
|
Reference in New Issue
Block a user