Details
-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 10.0.12
-
Fix Version/s: 10.0
-
Component/s: None
-
Labels:
-
Environment:EC2 instance, Amazon Linux AMI, MaraiaDB 10.0.12
Description
The CONNECT engine uses a 32-bit date and cannot handle dates greater than 2038-01-19: they wrap around to 1/1/1970.
Our data warehouse uses date ranging (begin and end dates) to track history, and the "current" data has an end date of 8/8/8888. Unfortunately, when trying to transfer data between instances, these dates are returned as 1/1/1970 (in the previous .11 release, they were 1/1/1969). This is preventing us from using the CONNECT engine.
create table raw_feed.bad_date (d date);
insert into raw_feed.bad_date values ('2038-01-20');
select * from raw_feed.bad_date;
--> 1/20/2038 12:00:00 AM
CREATE TABLE connectdb.bad_date_local (d date) ENGINE=CONNECT DEFAULT CHARSET=latin1
CONNECTION='mysql://_(same instance)_/raw_feed/bad_date' table_type=mysql option_list='password=....';
select * from connectdb.bad_date_local;
--> 1/1/1970 12:00:00 AM
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
I think I can handle this. Indeed, converting to a 32 bit integer is useless
when a DATE_FORMAT is specified.
Meanwhile, a simple workaround is to declare the columns are CHAR using the
MariaDB standard representation in them. For instance:
Everything seem to work as if the columns were true date types.