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

Merged
merged 2 commits into from
Mar 9, 2020

Conversation

djshow832
Copy link
Contributor

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.

@djshow832 djshow832 requested a review from a team as a code owner March 9, 2020 08:47
@ghost ghost requested review from lzmhhh123 and winoros and removed request for a team March 9, 2020 08:47
@djshow832 djshow832 requested review from AilinKid, crazycs520 and a team March 9, 2020 08:47
@ghost ghost removed their request for review March 9, 2020 08:47
@djshow832
Copy link
Contributor Author

/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

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

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

sre-bot commented Mar 9, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Mar 9, 2020

cherry pick to release-3.0 in PR #15231

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants