Skip to content

Conversation

Defined2014
Copy link
Contributor

@Defined2014 Defined2014 commented Jun 20, 2025

What problem does this PR solve?

Issue Number: close #61884

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
Modified v7.5.6 and let it create a mysql.global_variables table with clustered index.

Run v8.5.2 to upgrade the cluster, before this PR, it will failed. After this PR, cluster start up success.

  • 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 20, 2025
Copy link

tiprow bot commented Jun 20, 2025

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

@Defined2014 Defined2014 requested review from glorv and xhebox June 20, 2025 09:20
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 20, 2025
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 20, 2025
Copy link

ti-chi-bot bot commented Jun 20, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-06-20 09:21:49.399254406 +0000 UTC m=+436362.122433387: ☑️ agreed by xhebox.
  • 2025-06-20 09:23:49.899851178 +0000 UTC m=+436482.623030161: ☑️ agreed by glorv.

Copy link

tiprow bot commented Jun 20, 2025

@Defined2014: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tidb_parser_test d79b426 link true /test tidb_parser_test
fast_test_tiprow d79b426 link true /test fast_test_tiprow

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link

codecov bot commented Jun 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.5039%. Comparing base (cbafb78) to head (232a50c).
Report is 4 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61890        +/-   ##
================================================
+ Coverage   73.0325%   73.5039%   +0.4714%     
================================================
  Files          1735       1735                
  Lines        481432     481446        +14     
================================================
+ Hits         351602     353882      +2280     
+ Misses       108298     106060      -2238     
+ Partials      21532      21504        -28     
Flag Coverage Δ
integration 42.3445% <0.0000%> (?)
unit 72.3556% <100.0000%> (+0.0881%) ⬆️

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

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 46.5910% <ø> (+0.0208%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Defined2014
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jun 20, 2025

@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 20, 2025
@Defined2014
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Jun 20, 2025

@Defined2014: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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.

@@ -1046,8 +1046,8 @@ func initGlobalVariableIfNotExists(s sessiontypes.Session, name string, val any)
mysql.SystemDB, mysql.GlobalVariablesTable, name)
terror.MustNil(err)
req := rs.NewChunk(nil)
err = rs.Next(ctx, req)
terror.MustNil(err)
terror.MustNil(rs.Next(ctx, req))
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe it's better to use

// DrainRecordSetAndClose fetches the rows in the RecordSet and closes it.
func DrainRecordSetAndClose(ctx context.Context, rs RecordSet, maxChunkSize int) ([]chunk.Row, error) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upated it with sqlexec.ExecSQL

Copy link

ti-chi-bot bot commented Jun 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, xhebox, yudongusa

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 Jun 21, 2025
@Defined2014 Defined2014 added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jun 21, 2025
@Defined2014 Defined2014 added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Jun 21, 2025
@ti-chi-bot ti-chi-bot bot merged commit 43c7806 into pingcap:master Jun 21, 2025
22 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Jun 21, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #61905.
But this PR has conflicts, please resolve them!

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. release-note-none Denotes a PR that doesn't merit a release note. 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.

initGlobalVariableIfNotExists function forget close rs
6 participants