MySQL Variables avoid_temporal_upgrade 数据库 参数变量解释及正确配置使用

本站中文解释

avoid_temporal_upgrade参数,控制了MySQL在初始化或重新启动时是否要升级时间字段到最新格式。

变量类型:Boolean

值范围:

ON (默认):对时间字段进行升级。

OFF:不对时间字段进行升级。

用法:

在MySQL的配置文件中,使用以下命令设置avoid_temporal_upgrade参数:

avoid_temporal_upgrade=[ON/OFF]

比如:

avoid_temporal_upgrade=off

官方英文解释

avoid_temporal_upgrade

Command-Line Format --avoid-temporal-upgrade[={OFF|ON}]
Deprecated Yes
System Variable avoid_temporal_upgrade
Scope Global
Dynamic Yes
Type Boolean
Default Value OFF

This variable controls whether ALTER
TABLE
implicitly upgrades temporal columns found to
be in pre-5.6.4 format (TIME,
DATETIME, and
TIMESTAMP columns without
support for fractional seconds precision). Upgrading such
columns requires a table rebuild, which prevents any use of
fast alterations that might otherwise apply to the operation
to be performed.

This variable is disabled by default. Enabling it causes
ALTER TABLE not to rebuild
temporal columns and thereby be able to take advantage of
possible fast alterations.

This variable is deprecated; expect it to be removed in a
future release of MySQL.


数据运维技术 » MySQL Variables avoid_temporal_upgrade 数据库 参数变量解释及正确配置使用