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

Add truncated statement indicator to mysql query sample events #9620

Conversation

alexandre-normand
Copy link
Contributor

What does this PR do?

This adds a boolean field to mysql query sample events so we can later surface this to users.

Motivation

We'd like to be able to surface when a statement has been truncated so we can advise uses on how to proceed to prevent truncation (which would be increasing performance_schema_max_sql_text_length).

Additional Notes

The detection of a truncated statement is done by checking for the presence of ... at the end of a statement. This works for all supported versions (as the tests show).

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@alexandre-normand alexandre-normand requested review from a team as code owners June 29, 2021 20:46
@alexandre-normand alexandre-normand changed the title Add statement_truncated indicator to mysql query sample events Add statement truncated indicator to mysql query sample events Jun 29, 2021
@alexandre-normand alexandre-normand changed the title Add statement truncated indicator to mysql query sample events Add truncated statement indicator to mysql query sample events Jun 29, 2021
@codecov
Copy link

codecov bot commented Jun 30, 2021

Codecov Report

Merging #9620 (be68f48) into master (e71a245) will decrease coverage by 0.01%.
The diff coverage is 88.23%.

Flag Coverage Δ
mysql 84.87% <88.23%> (-0.58%) ⬇️

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

djova
djova previously approved these changes Jun 30, 2021
@alexandre-normand alexandre-normand merged commit 4f578f1 into master Jul 8, 2021
@alexandre-normand alexandre-normand deleted the alex.normand/add-statement-truncated-indicator-on-mysql-samples branch July 8, 2021 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants