tidb
tidb copied to clipboard
executor: fix query panic on INFORMATION_SCHEMA.CLUSTER_SLOW_QUERY with some slow query files
What problem does this PR solve?
Issue Number: close #54324
Problem Summary:
What changed and how does it work?
The old code does not handle all the cases well.
if i >= len(lines)-1 should be a typo, it should be something like if i >= len(chars)-1
And the simplified logic is just the same as this PR.
Check List
Tests
- [X] 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.
None
Hi @tiancaiamao. Thanks for your PR.
PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.
I understand the commands that are listed here.
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-sigs/prow repository.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 56.3452%. Comparing base (
80c2218) to head (be1d3ec). Report is 925 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #54325 +/- ##
=================================================
- Coverage 72.7965% 56.3452% -16.4513%
=================================================
Files 1526 1652 +126
Lines 435900 610279 +174379
=================================================
+ Hits 317320 343863 +26543
- Misses 98931 243183 +144252
- Partials 19649 23233 +3584
| Flag | Coverage Δ | |
|---|---|---|
| integration | 37.5014% <0.0000%> (?) |
|
| unit | 72.1153% <100.0000%> (+0.3229%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Components | Coverage Δ | |
|---|---|---|
| dumpling | 52.9656% <ø> (ø) |
|
| parser | ∅ <ø> (∅) |
|
| br | 52.7254% <ø> (+6.6106%) |
:arrow_up: |
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: crazycs520, Defined2014
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [Defined2014,crazycs520]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
[LGTM Timeline notifier]
Timeline:
2024-06-28 17:26:19.938547655 +0000 UTC m=+999706.424036487: :ballot_box_with_check: agreed by crazycs520.2024-07-01 06:42:08.985063218 +0000 UTC m=+1220255.470552049: :ballot_box_with_check: agreed by Defined2014.
/run-check-issue-triage-complete
/test unit-test
@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.
In response to this:
/test unit-test
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-sigs/prow repository.
/retest-required
@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.
In response to this:
/retest-required
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-sigs/prow repository.
In response to a cherrypick label: new pull request created to branch release-8.1: #54710.
In response to a cherrypick label: new pull request created to branch release-7.5: #54711.
In response to a cherrypick label: new pull request created to branch release-6.5: #54935.
In response to a cherrypick label: new pull request created to branch release-7.1: #56899.