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

extension: make RelatedTables work when the statement fails #50989

Merged
merged 2 commits into from
May 8, 2024

Conversation

CbcWestwolf
Copy link
Member

What problem does this PR solve?

Issue Number: close #50988

Problem Summary:

What changed and how does it work?

If the statement fails (err != nil in RelatedTables), traverse the AST to get all table names.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • 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 a bug for audit log that table filters don't work when status_code is 0

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels Feb 5, 2024
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Attention: Patch coverage is 88.40580% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 77.9483%. Comparing base (c5f2935) to head (25081bc).
Report is 714 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #50989        +/-   ##
================================================
+ Coverage   72.2453%   77.9483%   +5.7029%     
================================================
  Files          1467       1655       +188     
  Lines        361792     538862    +177070     
================================================
+ Hits         261378     420034    +158656     
- Misses        81073      97080     +16007     
- Partials      19341      21748      +2407     
Flag Coverage Δ
integration 55.8881% <41.3043%> (?)
unit 74.8477% <87.6811%> (+2.7323%) ⬆️

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

Components Coverage Δ
dumpling 54.1396% <ø> (-2.1237%) ⬇️
parser ∅ <ø> (∅)
br 58.2888% <ø> (+12.0578%) ⬆️

@CbcWestwolf
Copy link
Member Author

CbcWestwolf commented Feb 6, 2024

@winoros @tiancaiamao @lcwangchao
This PR would reuse and modify extractTableList. PTAL

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@bb7133
Copy link
Member

bb7133 commented Feb 18, 2024

PTAL @qw4990 @winoros

Copy link

tiprow bot commented Feb 27, 2024

@CbcWestwolf: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tiprow_fast_test 25081bc link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

@CbcWestwolf
Copy link
Member Author

/retest

Copy link

ti-chi-bot bot commented May 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, qw4990

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

Copy link

ti-chi-bot bot commented May 8, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-18 07:15:54.862039055 +0000 UTC m=+168643.609662166: ☑️ agreed by bb7133.
  • 2024-05-08 02:51:23.471822851 +0000 UTC m=+1016837.228958418: ☑️ agreed by qw4990.

@ti-chi-bot ti-chi-bot bot merged commit fe7c324 into pingcap:master May 8, 2024
25 checks passed
@CbcWestwolf CbcWestwolf deleted the related_tables branch May 8, 2024 05:59
@CbcWestwolf
Copy link
Member Author

/cherry-pick release-8.1

@ti-chi-bot
Copy link
Member

@CbcWestwolf: new pull request created to branch release-8.1: #53308.

In response to this:

/cherry-pick release-8.1

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 ti-community-infra/tichi repository.

@CbcWestwolf
Copy link
Member Author

/cherry-pick release-7.1
/cherry-pick release-7.5

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request May 16, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

@CbcWestwolf: new pull request created to branch release-7.1: #53309.

In response to this:

/cherry-pick release-7.1
/cherry-pick release-7.5

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 ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

@CbcWestwolf: new pull request created to branch release-7.5: #53310.

In response to this:

/cherry-pick release-7.1
/cherry-pick release-7.5

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 ti-community-infra/tichi repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RelatedTables returns nothing if the statement fails to build logical plan
4 participants