-
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
*: support variable log_bin
#9343
Changes from 9 commits
62606d6
3eb96d3
b3af774
195eaa8
af59973
b682f93
6b8a504
13d63e9
8d8d596
4566842
054cb18
feea00e
f862b4c
82e7be3
fe01745
c1c1748
65943a9
4f7b4b0
bcbe263
889fbd9
1cde77b
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 |
---|---|---|
|
@@ -340,6 +340,15 @@ func ValidateSetSystemVar(vars *SessionVars, name string, value string) (string, | |
return "0", nil | ||
} | ||
return value, ErrWrongValueForVar.GenWithStackByArgs(name, value) | ||
case LogBin: | ||
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. Could we put it to line 335? Then we can remove line344-351. 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. LogBin need to return "ON" or "OFF", not "0" or "1" 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. @zimulala so i will merge 'LogBin' and 'TiDBEnableTablePartition' 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. No. I mean you can merge 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. The return value is "0" or “1”, is it expected? @zimulala 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. I think it's OK. We can handle 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. ok, i will change the code later. @zimulala |
||
if strings.EqualFold(value, "ON") || value == "1" { | ||
return "ON", nil | ||
} | ||
if strings.EqualFold(value, "OFF") || value == "0" { | ||
return "OFF", nil | ||
} | ||
return value, ErrWrongValueForVar.GenWithStackByArgs(name, value) | ||
|
||
case AutocommitVar, TiDBSkipUTF8Check, TiDBOptAggPushDown, | ||
TiDBOptInSubqToJoinAndAgg, | ||
TiDBBatchInsert, TiDBDisableTxnAutoRetry, TiDBEnableStreaming, | ||
|
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.
Keep the sys libs seperate with the 3rd libs. Please move it down to line 20.
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.
i already finished it