[MCOL-1039] DATE / DATETIME should support CURRENT_TIMESTAMP Created: 2017-11-18  Updated: 2023-10-25  Resolved: 2023-10-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: DDLProc
Affects Version/s: 1.1.0
Fix Version/s: 23.10

Type: New Feature Priority: Major
Reporter: Andrew Hutchings (Inactive) Assignee: Leonid Fedorov
Resolution: Won't Do Votes: 4
Labels: Compatibility

Issue Links:
Duplicate
is duplicated by MCOL-4716 CREATE TABLE with CURRENT_TIMESTAMP d... Closed
Relates
relates to MCOL-265 TIMESTAMP data type not supported Closed
relates to MCOL-3694 TIMESTAMP data type is accepted but c... Closed
Epic Link: Time, Timestamp and Timezone
Sprint: 2021-7
Epic/Theme: Hand

 Description   

MariaDB 10.2 supports CURRENT_TIMESTAMP as a default value for DATE and DATETIME. We should therefore add support for this in ColumnStore.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2017-11-18 ]

Support would also need to be added to cpimport, WriteEngine and mcsapi (possibly via a WriteEngine patch).

Comment by Andrew Hutchings (Inactive) [ 2017-11-19 ]

Having thought this through a bit, the CURRENT_TIMESTAMP should come from the machine executing the cpimport / API. This will be true for TZ as well when we support it. We should not assume that the PMs have the same clock or TZ as the UM. This means we will need them to look for "CURRENT_TIMESTAMP" in the default value in the system catalogue and act appropriately.
Depending on how the storage engine API sends this data we may also need a special message from the UM to fill this in.
We also need to support "ON UPDATE CURRENT_TIMESTAMP" which can also probably go into the default value of the system catalogue (another flag column is also possible, but would be harder for compatibility, maybe make the autoincrement column a bitmask?). This for now would only need support for MariaDB queries.

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