-
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: redact some error code, part(2/3) #20591
Conversation
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.
Would you like to add some cases in TestErrorRedact
b7353b8
to
b7d3b77
Compare
errno/errname.go
Outdated
@@ -527,8 +527,8 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{ | |||
ErrPartState: mysql.Message("Partition state cannot be defined from CREATE/ALTER TABLE", nil), | |||
ErrLimitedPartRange: mysql.Message("The %-.64s handler only supports 32 bit integers in VALUES", nil), | |||
ErrPluginIsNotLoaded: mysql.Message("Plugin '%-.192s' is not loaded", nil), | |||
ErrWrongValue: mysql.Message("Incorrect %-.32s value: '%-.128s'", nil), | |||
ErrNoPartitionForGivenValue: mysql.Message("Table has no partition for value %-.64s", nil), | |||
ErrWrongValue: mysql.Message("Incorrect %-.32s value: '%-.128s'", []int{0, 1}), |
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.
The first argument is the Type and should not be redacted, am I right?
errno/errname.go
Outdated
@@ -670,9 +670,9 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{ | |||
ErrInsideTransactionPreventsSwitchBinlogDirect: mysql.Message("Cannot modify @@session.binlogDirectNonTransactionalUpdates inside a transaction", nil), | |||
ErrStoredFunctionPreventsSwitchBinlogDirect: mysql.Message("Cannot change the binlog direct flag inside a stored function or trigger", nil), | |||
ErrSpatialMustHaveGeomCol: mysql.Message("A SPATIAL index may only contain a geometrical type column", nil), | |||
ErrTooLongIndexComment: mysql.Message("Comment for index '%-.64s' is too long (max = %d)", nil), | |||
ErrTooLongIndexComment: mysql.Message("Comment for index '%-.64s' is too long (max = %d)", []int{0}), |
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.
The index name is not necessary to be redacted
errno/errname.go
Outdated
ErrLockAborted: mysql.Message("Wait on a lock was aborted due to a pending exclusive lock", nil), | ||
ErrDataOutOfRange: mysql.Message("%s value is out of range in '%s'", nil), | ||
ErrDataOutOfRange: mysql.Message("%s value is out of range in '%s'", []int{0, 1}), |
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.
The first argument is the Type and should not be redacted.
b7d3b77
to
3838341
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.
LGTM
LGTM |
/merge |
/run-all-tests |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #21891 |
What problem does this PR solve?
Issue Number:
Problem Summary:
Part(2/3) of #18566 error message log redact, from
ErrLogInUse
toErrSkippingLoggedTransaction
.What is changed and how it works?
What's Changed:
Add some redact parameters for these error messages.
How it Works:
Related changes
Check List
Tests
Side effects
Release note