Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Currently there is no an easy way to convert on upgrade old TIME, DATETIME, TIMESTAMP (handled by Field_time, Field_datetime, Field_timestamp) columns to new columns (handled by Field_timef, Field_datetimef, Field_timestampf).
Conversion is necessary in some scenarios:
- To import InnoDB table spaces
- For replication purposes (as old temporal formats did not replicate fractional second precision in the data type metadata)
Possible conversion options:
- dump followed by restore
- "ALTER TABLE t1 MODIFY time_column TIME", i.e. using MODIFY with "same" data type.
Both ways are not convenient.
We'll fix ALTER TABLE t1 FORCE to replace old temporal columns according to the current @@mysql56_temporal_format settings:
- If @@mysql56_temporal_format is true, all TIME, DATETIME, TIMESTAMP columns will be replaced to the new format.
- If @@mysql56_temporal_format is false, all TIME, DATETIME, TIMESTAMP columns will be replaced to the old format.
Attachments
Issue Links
- is duplicated by
-
MDEV-9967 Convert old temporal types on ALTER TABLE ... FORCE
- Closed
- relates to
-
MDEV-12574 MAX(old_decimal) produces a column of the old DECIMAL type
- Closed
-
MDEV-15225 Can't import .ibd file with temporal type format differing from mysql56_temporal_format
- Closed
-
MDEV-19906 Show internal type for TIMESTAMP, DATETIME, and TIME columns
- Closed
-
MDEV-15228 Document how to upgrade old temporal columns
- Closed
-
MDEV-29754 Unexpected ER_NOT_FORM_FILE or ER_VERS_FIELD_WRONG_TYPE upon creating system-versioned table under mysql56_temporal_format=0
- Closed