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

infoschema, planner: fix wrong table_names in statement summary (#15228) #15231

Merged
merged 2 commits into from
Mar 13, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Mar 9, 2020

cherry-pick #15228 to release-3.0


What problem does this PR solve?

  1. In create database test statement, table_names in events_statements_summary_by_digest is "test.".
  2. In point get statement, schema name in table_names is current db, not the schema where table exists.

What is changed and how it works?

  1. If table name is empty, do not output this table name.
  2. Replace the schema name with the right one in point get statement.

StmtCtx.Tables is only used in statement summary and test cases, so it's safe.

Check List

Tests

  • Unit test

Code changes

N/A

Side effects

N/A

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Fix the bug that table_names in statement summary tables may be wrong in some statements.

@sre-bot
Copy link
Contributor Author

sre-bot commented Mar 9, 2020

/run-all-tests

@djshow832
Copy link
Contributor

/run-unit-test

Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

LGTM

@djshow832
Copy link
Contributor

/run-unit-test

@AilinKid AilinKid added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 9, 2020
Copy link
Contributor

@lzmhhh123 lzmhhh123 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 Mar 13, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 13, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Mar 13, 2020

/run-all-tests

@sre-bot sre-bot merged commit 2ea2b8c into pingcap:release-3.0 Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/infoschema status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants