Skip to content
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

*: fix empty SQL in slow log for internal statement #54274

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

lcwangchao
Copy link
Collaborator

@lcwangchao lcwangchao commented Jun 27, 2024

What problem does this PR solve?

Issue Number: close #54190 , close #52743 , close #53264

What changed and how does it work?

The internal session does not init EnableRedactLog which cause redact.String always returns empty string.

Init it as an default value in this PR.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
set @@tidb_slow_log_threshold=0;

And check the output slow logs. No empty strings again.

  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

fix empty SQL in slow log for internal statement

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 27, 2024
Copy link

tiprow bot commented Jun 27, 2024

Hi @lcwangchao. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@lcwangchao
Copy link
Collaborator Author

/check-issue-triage-complete

@lcwangchao
Copy link
Collaborator Author

/check-issue-triage-complete

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 27, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 27, 2024
Copy link

ti-chi-bot bot commented Jun 27, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-27 07:50:21.813912835 +0000 UTC m=+878748.299401662: ☑️ agreed by ywqzzy.
  • 2024-06-27 07:53:02.443388722 +0000 UTC m=+878908.928877555: ☑️ agreed by xhebox.

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 56.3466%. Comparing base (521c999) to head (23ffd64).
Report is 14 commits behind head on master.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #54274         +/-   ##
=================================================
- Coverage   74.7837%   56.3466%   -18.4372%     
=================================================
  Files          1523       1644        +121     
  Lines        361533     614159     +252626     
=================================================
+ Hits         270368     346058      +75690     
- Misses        71520     244775     +173255     
- Partials      19645      23326       +3681     
Flag Coverage Δ
integration 38.2081% <20.0000%> (?)
unit 71.8007% <60.0000%> (-1.8793%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9656% <ø> (-2.2339%) ⬇️
parser ∅ <ø> (∅)
br 52.7422% <ø> (+4.7948%) ⬆️

@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 27, 2024
@Defined2014 Defined2014 added the needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. label Jun 28, 2024
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jun 28, 2024
@easonn7
Copy link

easonn7 commented Jun 28, 2024

/approve

Copy link

ti-chi-bot bot commented Jun 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: easonn7, xhebox, ywqzzy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Jun 28, 2024
@ti-chi-bot ti-chi-bot bot merged commit 0106f4c into pingcap:master Jun 28, 2024
21 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #54309.

@lcwangchao lcwangchao deleted the fix_54190 branch July 29, 2024 06:24
ti-chi-bot bot pushed a commit that referenced this pull request Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
6 participants