-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: set system_time_zone
from system_tz
#13934
Conversation
4e92705
to
b7ca0cc
Compare
Codecov Report
@@ Coverage Diff @@
## master #13934 +/- ##
===========================================
Coverage 80.2315% 80.2315%
===========================================
Files 480 480
Lines 120748 120748
===========================================
Hits 96878 96878
Misses 16172 16172
Partials 7698 7698 |
/run-all-tests |
1 similar comment
/run-all-tests |
/run-common-test /run-integration-common-test |
LGTM |
b7ca0cc
to
aae1742
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
defer server.Close() | ||
|
||
tz1 := tk.MustQuery("select variable_value from mysql.tidb where variable_name = 'system_tz'").Rows() | ||
tk.MustQuery("select @@system_time_zone").Check(tz1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need test check equal to TZ from host?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What problem does this PR solve?
This PR tries to close #13894, by setting system variable
system_time_zone
fromsystem_tz
variable inmysql.tidb
table.What is changed and how it works?
A
setSystemTimeZoneVariable()
is added toserver.NewServer()
, which get the value ofsystemTZ
from exported functionGetSystemTZ()
Please notice that this PR doesn't change any other behavior: all time-related calculations are not affected.
Check List
Tests
The scripts described in #13894 is also used for manual tests.
Code changes
Side effects
Related changes
Release note