当前位置:网站首页>Is there a problem with the CURRENT_TIMESTAMP(6) function?

Is there a problem with the CURRENT_TIMESTAMP(6) function?

2022-08-10 12:35:00 Daming_Database_Commander

Does the CURRENT_TIMESTAMP(6) function of MYSQL ON UPDATE CURRENT_TIMESTAMP(6) have a 2038 limit like the TIMESTAMP field type, and is there a time zone conversion cost?




Accept answer 1:

There are also limitations;
image.png

The experiment sees the truth, I hope it will help you, if you have any help, please click to accept, thank you



Other Answer 1:

There are also limitations;
image.png

The experiment sees the truth, I hope it will help you, if you have any help, please click to accept, thank you


Other Answer 2:

I tested with 8.0.Also have this problem.


Other Answer 3:

image.png

Screenshot from:
https://www.modb.pro/db/130918

I hope this helps you


Other Answer 4:

In this way, MYSQL 2038 is fully limited


Will there be another time zone conversion operation?


Other Answer 5:

image.png
image.png

Two experiments again. After changing the system time to 2038, the entire mysql database collapsed. It should be the timestamp used in mysql, which caused mysql to crash.I don't know if other versions have fixed this issue.
I only have version 5.6 now.


Other Answer 6:

Ask whether the CURRENT_TIMESTAMP(6) function of MYSQL ON UPDATE CURRENT_TIMESTAMP(6) has the same time zone conversion cost as the TIMESTAMP field type? For example, the time zone is set to SYSTEM
https://mp.weixin.qq.com/s/AtyaIP92L6KnZFB9bQA3ug
MySQL parameter time_zone causes high online sys cpu


Other Answer 7:

The conclusion of the article clearly states that the partition conversion is caused by time_zone = system.
image.png

It is recommended to replace TIMESTAMP with datetime;
Content interception: https://wenku.baidu.com/view/efc469e0b84cf7ec4afe04a1b0717fd5370cb24d.html

image.png

原网站

版权声明
本文为[Daming_Database_Commander]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/222/202208101044457479.html