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

executor, infoschema, util: add sum_errors and sum_warnings to statement summary tables #16456

Merged
merged 7 commits into from
Apr 17, 2020

Conversation

djshow832
Copy link
Contributor

What problem does this PR solve?

Problem Summary:
Add sum_errors and sum_warnings to statements_summary.
These 2 fields indicate the total errors and warnings encountered for each kind of SQL.

What is changed and how it works?

What's Changed:
ONLY summarize runtime errors now. It's a big move to also consider compiler errors, so it's not suitable for 4.0.
MySQL: Statements that has parser errors are not summarized in statement summary tables.
TiDB: Statements that has parser errors or compiler errors are not summarized.

How it Works:
Error: check whether it succeeded.
Warning: get StmtCtx.WarningCount().

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

N/A

Release note

  • Add two fields sum_errors and sum_warnings to statement summary tables.

@djshow832 djshow832 requested a review from a team as a code owner April 16, 2020 04:59
@ghost ghost requested review from SunRunAway and removed request for a team April 16, 2020 04:59
@github-actions github-actions bot added sig/sql-infra SIG: SQL Infra sig/execution SIG execution labels Apr 16, 2020
@codecov
Copy link

codecov bot commented Apr 16, 2020

Codecov Report

Merging #16456 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #16456   +/-   ##
===========================================
  Coverage   80.3601%   80.3601%           
===========================================
  Files           506        506           
  Lines        136605     136605           
===========================================
  Hits         109776     109776           
  Misses        18244      18244           
  Partials       8585       8585           

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.

Rest LGTM

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 Author

/run-unit-test

@djshow832 djshow832 requested a review from Deardrops April 16, 2020 07:58
Copy link
Contributor

@Deardrops Deardrops 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 Author

/merge

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

sre-bot commented Apr 16, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Apr 16, 2020

@djshow832 merge failed.

@djshow832
Copy link
Contributor Author

/run-integration-copr-test

@djshow832
Copy link
Contributor Author

/run-unit-test

@sre-bot
Copy link
Contributor

sre-bot commented Apr 17, 2020

cherry pick to release-4.0 in PR #16502

bb7133 pushed a commit that referenced this pull request Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/infoschema sig/execution SIG execution sig/sql-infra SIG: SQL Infra 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.

5 participants