[MCOL-3374] PrimProc crash and restart on running LAST_DAY function on '0000-00-00' date Created: 2019-06-10  Updated: 2023-03-06  Resolved: 2023-03-06

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 1.2.0
Fix Version/s: Icebox

Type: Bug Priority: Critical
Reporter: nishant Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Environment:

CentOS Linux 7.4



 Description   

Cerate a table with a datetime column.

create table `date_columnstore`(
	recDate datetime DEFAULT NULL
)ENGINE=columnstore DEFAULT CHARSET=utf8;

Insert a record with '0000-00-00' as date.

insert into date_columnstore values ('0000-00-00');

Run the query:

select last_day(CONCAT(year(recdate),'-0',(month(recdate),'-01'))) from date_columnstore;

This causes PrimProc to restart.

The same query in InnoDB or on dual returns null.

The current workaround for us is to replace '0000-00-00' with null.



 Comments   
Comment by Todd Stoffel (Inactive) [ 2023-03-06 ]

This ticket was created prior to convergence with the server and may be obsolete. If you find this issue still exists in a modern version, please open a new ticket.

Generated at Thu Feb 08 02:42:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.