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

*: use model.CIStr in infoschema v2 to handle case insensitive #55450

Merged
merged 7 commits into from
Aug 19, 2024

Conversation

tiancaiamao
Copy link
Contributor

@tiancaiamao tiancaiamao commented Aug 15, 2024

What problem does this PR solve?

Issue Number: close #55421

Problem Summary:

What changed and how does it work?

Use model.CIStr in infoschema v2.
Currently, most of the code use case insensitive to compare to string, and use original string for display.

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 do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 15, 2024
Copy link

tiprow bot commented Aug 15, 2024

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.

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.

Project coverage is 75.6080%. Comparing base (336d3a3) to head (6ded1aa).
Report is 10 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55450        +/-   ##
================================================
+ Coverage   75.0073%   75.6080%   +0.6006%     
================================================
  Files          1576       1577         +1     
  Lines        365712     441252     +75540     
================================================
+ Hits         274311     333622     +59311     
- Misses        71705      87107     +15402     
- Partials      19696      20523       +827     
Flag Coverage Δ
integration 50.8374% <66.6666%> (?)
unit 72.0014% <94.4444%> (-1.9951%) ⬇️

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

Components Coverage Δ
dumpling 52.9567% <ø> (-2.2327%) ⬇️
parser ∅ <ø> (∅)
br 63.1582% <ø> (+15.3318%) ⬆️

Copy link
Contributor

@lance6716 lance6716 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

@@ -954,9 +954,9 @@ func (b *Builder) createSchemaTablesForDB(di *model.DBInfo, tableFromMeta tableF
if b.enableV2 {
for name, id := range di.TableName2ID {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the assignment of di.TableName2ID, the value comes from meta.GetAllNameToIDAndTheMustLoadedTableInfo. And in that function the table name is matched by L: regexp. Should we match for O: instead? Otherwise tableName: model.NewCIStr(name), is still always lowercased

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. We should change to O: match

@tiancaiamao
Copy link
Contributor Author

/test unit-test

Copy link

tiprow bot commented Aug 16, 2024

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

@tiancaiamao
Copy link
Contributor Author

/ok-to-test

@ti-chi-bot ti-chi-bot bot added ok-to-test Indicates a PR is ready to be tested. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Aug 16, 2024
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 17, 2024
@tiancaiamao
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 Aug 19, 2024
Copy link

ti-chi-bot bot commented Aug 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, wjhuang2016

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 the approved label Aug 19, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 19, 2024
Copy link

ti-chi-bot bot commented Aug 19, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-19 03:27:18.249926458 +0000 UTC m=+149633.384376581: ☑️ agreed by lance6716.
  • 2024-08-19 05:50:33.521639316 +0000 UTC m=+158228.656089437: ☑️ agreed by wjhuang2016.

@tiancaiamao
Copy link
Contributor Author

/retest

1 similar comment
@tiancaiamao
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit f751f73 into pingcap:master Aug 19, 2024
24 checks passed
@tiancaiamao tiancaiamao deleted the issue55421 branch August 19, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

all values ​​of the TABLE_SCHEMA column of INFORMATION_SCHEMA.TIFLASH_REPLICA are converted to lowercase
3 participants