|
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.
|