Skip to content

*: redact arguments for Error#1051

Merged
bb7133 merged 5 commits intopingcap:masterfrom
SunRunAway:logredact
Oct 21, 2020
Merged

*: redact arguments for Error#1051
bb7133 merged 5 commits intopingcap:masterfrom
SunRunAway:logredact

Conversation

@SunRunAway
Copy link
Contributor

@SunRunAway SunRunAway commented Oct 13, 2020

What problem does this PR solve?

part of pingcap/tidb#18566

What is changed and how it works?

  • changes in "github.com/pingcap/errors" Redact arguments for Error errors#27
    • redact errors in Error.GenWithStackByArgs & Error.FastGenByArgs
  • changes in "github.com/pingcap/parser" *: redact arguments for Error #1051
    • define mysql.Message to bind redactArgs which means which arguments of the error need to be redacted with each error message
    • MySQLErrName should be defined with mysql.Message.
    • ErrClass.NewStd considers redactArgs
    • All errors uses ErrClass.NewStd or mysql.Message to consider error redaction
  • changes in "github.com/pingcap/tidb" *: redact arguments for Error tidb#20436
    • inherit ErrClass.NewStd
    • All errors uses ErrClass.NewStd or mysql.Message to consider error redaction

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

Code changes

  • Has exported function/method change

@SunRunAway SunRunAway marked this pull request as ready for review October 14, 2020 11:40
Copy link
Contributor

@crazycs520 crazycs520 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ti-srebot ti-srebot added the status/LGT1 LGT1 label Oct 15, 2020
ichn-hu
ichn-hu previously approved these changes Oct 15, 2020
Copy link
Contributor

@ichn-hu ichn-hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot
Copy link
Contributor

@ichn-hu, Thanks for your review. The bot only counts LGTMs from Reviewers and higher roles, but you're still welcome to leave your comments. See the corresponding SIG page for more information. Related SIG: ddl(slack).

@ti-srebot ti-srebot removed the status/LGT1 LGT1 label Oct 21, 2020
@ti-srebot ti-srebot added the status/LGT2 LGT2 label Oct 21, 2020
@bb7133 bb7133 merged commit 783a032 into pingcap:master Oct 21, 2020
@SunRunAway SunRunAway deleted the logredact branch October 21, 2020 06:25
lonng pushed a commit that referenced this pull request Nov 10, 2020
crazycs520 pushed a commit that referenced this pull request Nov 10, 2020
Co-authored-by: Feng Liyuan <darktemplar.f@gmail.com>
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants