-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
*: write system timezone into mysql.tidb in bootstrap stage. #7638
Changes from 1 commit
ec6a822
40f1caf
ad574a4
e76c224
a74739c
f0502c8
ed136b9
085dc79
8ba623f
13c7c1b
e962f82
26f65f7
d708186
ceedc34
2adc1e8
acc0262
709c32c
350d27d
c95e6c3
21e9e22
a84c028
c1658d8
a517a43
b5e39b6
84b6e8f
dae8a5a
5c373bf
2d0aca2
e624443
f3ad3bc
692d4d5
b32bdd2
49454d5
318c12b
cb5fd7d
ec66759
a3c3cc4
3976eda
d522982
dd2d0c9
29679ab
733331e
e9bb73b
1d8ddfa
bd24bee
2f8018a
7d6ae04
d315b25
5dc988b
1f99ca1
e4418cf
44996c2
bd1693e
fda4813
9986492
1acd491
65051bb
a37aeeb
e20dc07
74d394a
64a5b2e
e77ee43
1b53dff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,10 @@ package executor | |
|
||
import ( | ||
"math" | ||
"path/filepath" | ||
"runtime" | ||
"sort" | ||
"strings" | ||
"sync" | ||
"sync/atomic" | ||
"time" | ||
|
@@ -139,9 +141,15 @@ func zone(sctx sessionctx.Context) (string, int64) { | |
if name == "Local" { | ||
path, err := filepath.EvalSymlinks("/etc/localtime") | ||
if err != nil { | ||
log.Errorln(err) | ||
return "Sysytem", int64(offset) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. I have no idea why this happens. - - Already fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/Sysytem/System |
||
} | ||
return getTZNameFromFileName(path), int64(offset) | ||
name, err = getTZNameFromFileName(path) | ||
if err != nil { | ||
log.Errorln(err) | ||
return "System", int64(offset) | ||
} | ||
return name, int64(offset) | ||
} | ||
|
||
return name, int64(offset) | ||
|
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.
How is this function evaluated? If it is evaluated frequently, we need to cache the zone.
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.
Agree.