You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mysql server is configured with time_zone=system and the server's time zone is Shanghai. The problem I encountered was that during the gh-ost run, after the insert statement involved the timestamp time field was successfully inserted, when the data was queried again, the time field increased by 8 hours.
question
Looking at the source code, I found that time_zone = '+00:00' is defined in the ApplyDMLEventQueries function, which is equal to the UTC time zone. Because insert is written in UTCtime zone, but select is read in SYSTEM time zone, the time field is increased by 8 hours.
My question is why the UTC time zone is set when applying dml event instead of using the default time zone configuration?
The text was updated successfully, but these errors were encountered:
gh-ost
: 1.1.2mysql
: 5.7.26time_zone
: system(ShangHai)Mysql server is configured with
time_zone=system
and the server's time zone isShanghai
. The problem I encountered was that during the gh-ost run, after the insert statement involved the timestamp time field was successfully inserted, when the data was queried again, the time field increased by 8 hours.Looking at the source code, I found that
time_zone = '+00:00'
is defined in theApplyDMLEventQueries
function, which is equal to the UTC time zone. Because insert is written inUTC
time zone, but select is read inSYSTEM
time zone, the time field is increased by 8 hours.My question is why the UTC time zone is set when applying dml event instead of using the default time zone configuration?
The text was updated successfully, but these errors were encountered: