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

ddl: allow StatePublic in createTableWithForeignKeys for BR #51870

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

YangKeao
Copy link
Member

What problem does this PR solve?

Issue Number: close #51838

Problem Summary:

When restoring some tables, the state can be StatePublic, so createTableWithForeignKeys should also handle the StatePublic.

What changed and how does it work?

Also handle the StatePublic in createTableWithForeignKeys. In createTable, the State will always be reset to StateNone (though sounds weird 🤦, but this code has been existing for 8 years).

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

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/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-triage-completed labels Mar 18, 2024
Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Merging #51870 (6408e09) into master (5a2b8e8) will decrease coverage by 14.4470%.
Report is 49 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #51870         +/-   ##
=================================================
- Coverage   70.7104%   56.2635%   -14.4470%     
=================================================
  Files          1477       1592        +115     
  Lines        438429     618687     +180258     
=================================================
+ Hits         310015     348095      +38080     
- Misses       108992     246941     +137949     
- Partials      19422      23651       +4229     
Flag Coverage Δ
integration 38.6443% <100.0000%> (?)
unit 71.3961% <100.0000%> (+0.8841%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 57.6044% <ø> (+11.7451%) ⬆️

@YangKeao
Copy link
Member Author

/test pull-br-integration-test

Copy link

tiprow bot commented Mar 18, 2024

@YangKeao: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test pull-br-integration-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/test-infra repository.

@YangKeao
Copy link
Member Author

/test pull-br-integration-test

Copy link

tiprow bot commented Mar 18, 2024

@YangKeao: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test pull-br-integration-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/test-infra repository.

@YangKeao YangKeao marked this pull request as draft March 18, 2024 17:18
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 18, 2024
@YangKeao
Copy link
Member Author

/test pull-br-integration-test

Copy link

tiprow bot commented Mar 18, 2024

@YangKeao: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test pull-br-integration-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/test-infra repository.

@YangKeao
Copy link
Member Author

/test pull-br-integration-test

Copy link

tiprow bot commented Mar 19, 2024

@YangKeao: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test pull-br-integration-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/test-infra repository.

@YangKeao YangKeao marked this pull request as ready for review March 19, 2024 04:41
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 19, 2024
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
@YangKeao
Copy link
Member Author

/test pull-br-integration-test

Copy link

tiprow bot commented Mar 19, 2024

@YangKeao: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test pull-br-integration-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/test-infra repository.

@YangKeao
Copy link
Member Author

/retest

2 similar comments
@YangKeao
Copy link
Member Author

/retest

@YangKeao
Copy link
Member Author

/retest

@YangKeao YangKeao added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. labels Mar 21, 2024
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 21, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 21, 2024
Copy link

ti-chi-bot bot commented Mar 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-21 06:38:30.982396392 +0000 UTC m=+1531538.004642782: ☑️ agreed by tangenta.
  • 2024-03-21 07:37:06.26019615 +0000 UTC m=+1535053.282442548: ☑️ agreed by zimulala.

Copy link

ti-chi-bot bot commented Mar 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, tangenta, zimulala

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 Mar 22, 2024
@ti-chi-bot ti-chi-bot bot merged commit f8accca into pingcap:master Mar 22, 2024
23 of 24 checks passed
@ti-chi-bot
Copy link
Member

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

ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Mar 22, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

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

@ti-chi-bot
Copy link
Member

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

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-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore failed with foreigh key table when ddl-batch-size=1
5 participants