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

planner: fix count(*) return wrong value for information_schema.tables #57506

Merged
merged 4 commits into from
Nov 20, 2024

Conversation

joechenrh
Copy link
Contributor

@joechenrh joechenrh commented Nov 19, 2024

What problem does this PR solve?

Issue Number: close #56987

Problem Summary:

InfoSchemaBaseExtractor wrongly filter table names for the fast path introduced by #55574

What changed and how does it work?

Introduce a new variable extractLowerString to dertermine whether to do case-insensitive comparisons for specific columns.

Test case is not added in integration test because we don't want to write some hardcoded value. (ref #57306)

Check List

Tests

  • 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

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 19, 2024
Copy link

tiprow bot commented Nov 19, 2024

Hi @joechenrh. 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.

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.0465%. Comparing base (0e3efb6) to head (d6dfc2f).
Report is 17 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #57506        +/-   ##
================================================
+ Coverage   72.8325%   73.0465%   +0.2139%     
================================================
  Files          1672       1676         +4     
  Lines        462833     467591      +4758     
================================================
+ Hits         337093     341559      +4466     
- Misses       104947     105287       +340     
+ Partials      20793      20745        -48     
Flag Coverage Δ
integration 43.3050% <100.0000%> (?)
unit 72.2355% <100.0000%> (+0.0270%) ⬆️

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

Components Coverage Δ
dumpling 52.7673% <ø> (ø)
parser ∅ <ø> (∅)
br 42.0090% <ø> (-3.0787%) ⬇️
---- 🚨 Try these New Features:

@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 20, 2024
@joechenrh
Copy link
Contributor Author

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Nov 20, 2024
@joechenrh
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 20, 2024
@joechenrh joechenrh changed the title planner: fix count(*) return wrong value for information schema table planner: fix count(*) return wrong value for information_schema.tables Nov 20, 2024
@joechenrh
Copy link
Contributor Author

/retest

1 similar comment
@joechenrh
Copy link
Contributor Author

/retest

Copy link

ti-chi-bot bot commented Nov 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawkingrei, tangenta

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 20, 2024
Copy link

ti-chi-bot bot commented Nov 20, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-20 02:40:12.501711517 +0000 UTC m=+1015174.692580515: ☑️ agreed by tangenta.
  • 2024-11-20 06:46:33.502491161 +0000 UTC m=+14181.122145676: ☑️ agreed by hawkingrei.

@ti-chi-bot ti-chi-bot bot merged commit ad5ca42 into pingcap:master Nov 20, 2024
24 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #57549.

@joechenrh joechenrh deleted the fix-count-with-upper branch December 18, 2024 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

information_schema.tables return wrong results with count(*)
4 participants