Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
23.10.3
-
None
-
None
-
AlmaLinux 9.5 (Teal Serval)
mariadb from 11.4.5-MariaDB, client 15.2 for Linux (x86_64) using EditLine wrapper
MariaDB-client-11.4.5-1.el9.x86_64
MariaDB-client-compat-11.4.5-1.el9.noarch
MariaDB-columnstore-engine-11.4.5_23.10.3-1.el9.x86_64
MariaDB-common-11.4.5-1.el9.x86_64
MariaDB-server-11.4.5-1.el9.x86_64
MariaDB-server-compat-11.4.4-1.el9.noarch
MariaDB-shared-11.4.5-1.el9.x86_64
AlmaLinux 9.5 (Teal Serval) mariadb from 11.4.5-MariaDB, client 15.2 for Linux (x86_64) using EditLine wrapper MariaDB-client-11.4.5-1.el9.x86_64 MariaDB-client-compat-11.4.5-1.el9.noarch MariaDB-columnstore-engine-11.4.5_23.10.3-1.el9.x86_64 MariaDB-common-11.4.5-1.el9.x86_64 MariaDB-server-11.4.5-1.el9.x86_64 MariaDB-server-compat-11.4.4-1.el9.noarch MariaDB-shared-11.4.5-1.el9.x86_64
-
2025-7, 2025-8
Description
The IF function returns a wrong value when the first expression is FALSE, the second expression is NULL, the third expression is a datetime, and the table engine is Columnstore. See script below. The output is fine when using another store engine.
drop table if exists FOO; |
|
create table FOO(foo datetime) engine = columnstore; |
|
insert into FOO(foo) values (curtime()); |
|
select * from FOO; |
-- OK: 2025-04-07 12:59:34
|
|
select if(0 = 1, curdate(), foo) from FOO; |
-- OK: 2025-04-07 12:59:34
|
|
select if(0 = 1, null, foo) from FOO; |
-- NOT OK: 0000-00-00 00:00:00 |