tidb-cloud: add CREATE VIEW to DM target user GRANT example#22709
Open
alastori wants to merge 1 commit intopingcap:release-8.5from
Open
tidb-cloud: add CREATE VIEW to DM target user GRANT example#22709alastori wants to merge 1 commit intopingcap:release-8.5from
alastori wants to merge 1 commit intopingcap:release-8.5from
Conversation
Collaborator
Author
|
cc @GMHDBJD as DM lead and the engineer who closed sibling |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
The privilege table on line 464 of migrate-from-mysql-using-data-migration.md already lists CREATE VIEW as required, but the copy-pasteable GRANT example on line 469 omits it. This causes TiDB Lightning to abort at errormanager.Init with Error 1142 for any user who follows the example literally. The fix brings the GRANT example in line with the privilege table.
ac15f2a to
43aa528
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The privilege table on line 464 of
tidb-cloud/migrate-from-mysql-using-data-migration.mdalready listsCREATE VIEWas required (for views used by migration), but the copy-pasteableGRANTexample on line 469 omits it. This causes TiDB Lightning to abort aterrormanager.InitwithError 1142for any user who follows the example literally.This 1-line fix brings the GRANT example in line with the privilege table.
Reproduction
Standalone Lightning lab covering 8 scenarios across logical and physical modes against TiDB v8.5.5: alastori/tidb-sandbox#11
The diff in this PR is exactly the difference between scenarios L1 (fail with
Error 1142) and L2 (clean exit) in the lab.Why this hasn't been a flood of reports
Most users grant
ALL PRIVILEGESto the import target user, which silently includesCREATE VIEW. The bug is only visible to users who follow the docs literally and minimize grants for security or compliance reasons.Related
errormanager.Init)conflict_view(2024)errormanager.Initfailure pathFollow-up (not in this PR)
master. If preferred, the fix should be cherry-picked or a parallel master PR opened.tidb-lightning/tidb-lightning-requirements.mdlines 26 and 61 (the OSS Lightning prereq doc) have the same gap and need a separate update.Test plan
Error 1142. L2 (docs grant +CREATE VIEW): clean exit. The diff in this PR is the difference between L1 and L2.cc @GMHDBJD as DM lead and the engineer who closed the sibling Lightning errormanager bug (
pingcap/tiflow#11811)