[MDEV-33248] Connect engine does not support 32-bit timestamp Created: 2024-01-15  Updated: 2024-01-21  Resolved: 2024-01-21

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect, Temporal Types
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-32188 make TIMESTAMP use whole 32-bit unsig... In Testing

 Description   

INSTALL SONAME 'ha_connect';
 
create table t (c timestamp) ENGINE=Connect TABLE_TYPE=DOS;
 
insert into t values (from_unixtime(power(2,31)-1));
insert into t values (from_unixtime(power(2,32)-1));
 
select c, unix_timestamp(c) from t;
 
# Cleanup
drop table t;
uninstall soname 'ha_connect';

bb-11.4-timestamp 6a706d142be3309de89c28bcb48e91a72e8e8f69

insert into t values (from_unixtime(power(2,31)-1));
insert into t values (from_unixtime(power(2,32)-1));
select c, unix_timestamp(c) from t;
c	unix_timestamp(c)
2038-01-19 05:14:07	2147483647
0000-00-00 00:00:00	0
Warnings:
Warning	1264	Out of range value for column 'c' at row 2
Warning	1105	Out of range value -1 for column 'c' at row 2

Noticeably, INSERT works without a warning, the problem only happens (or becomes visible) upon SELECT.



 Comments   
Comment by Michael Widenius [ 2024-01-21 ]

Fix pushed to bb-10.4-timestamp branch

Generated at Thu Feb 08 10:37:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.