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

br: upgrade temporary system table #39443

Closed
wants to merge 6 commits into from

Conversation

MoCuishle28
Copy link
Contributor

@MoCuishle28 MoCuishle28 commented Nov 29, 2022

Signed-off-by: zhanggaoming gaoming.zhang@pingcap.com

What problem does this PR solve?

Issue Number: close #38785

Problem Summary:
TiDB changed mysql.user schema in higher version
e.g.,
version95 add a column User_attributes to mysql.user
version98 add a column Token_issuer to mysql.user

when restore 6.2.0 mysql.user to 6.4.0 will report :
Error: column count mismatch

What is changed and how it works?

Upgrade the backed up system tables before restoring to keep the schema same as the target cluster.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

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

Manual Test

  • insert record into mysql.user in v5.0.0 cluster
  • run full backup
  • restore to v6.4.0 cluster
  • success

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

Fix a bug that caused: When restoring a low-version system table to a high-version cluster, it fails due to missing columns.

@MoCuishle28 MoCuishle28 requested a review from a team as a code owner November 29, 2022 04:06
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/needs-triage-completed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 29, 2022
@MoCuishle28
Copy link
Contributor Author

/component br

@ti-chi-bot ti-chi-bot added the component/br This issue is related to BR of TiDB. label Nov 29, 2022
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 29, 2022
@MoCuishle28
Copy link
Contributor Author

/run-build

Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
Signed-off-by: zhanggaoming <gaoming.zhang@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/br This issue is related to BR of TiDB. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BR: 6.2.0 system table mysql.user can't be restored to 6.4.0
2 participants