Private/issue 9160 grant strict compat 80#69938
Conversation
…R BY Add regression coverage for compareCandidates large access-row-count gap behavior under no-limit and small-limit queries.
When cop region errors are EpochNotMatch, rebuild tasks first and skip backoff if the retry still targets the same region. Apply a short bounded backoff when the target region changes.
Add tidb_strict_compatibility_80 and enforce it in GRANT so non-existing users are not auto-created when compatibility is on. Keep existing behavior when compatibility is off and add a regression unit test for both paths.
|
[FORMAT CHECKER NOTIFICATION] Notice: To remove the The title description (the part after 📖 For more info, you can check the "Contribute Code" section in the development guide. |
|
Hi @ljluestc. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
|
|
[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 |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What problem does this PR solve?
Issue Number: close #9160
Problem Summary:
GRANTfrom implicitly creating users (equivalent to always enforcingNO_AUTO_CREATE_USER).GRANTwhensql_modedoes not includeNO_AUTO_CREATE_USER.What changed and how does it work?
tidb_strict_compatibility_80OFFGRANTexecution path inpkg/executor/grant.go:ErrCantCreateUserWithGrantif either:sql_modecontainsNO_AUTO_CREATE_USER, ortidb_strict_compatibility_80=ONTestGrantCreateUserWithStrictCompatibility80inpkg/executor/grant_test.goto cover strict-on and strict-off behavior.Check List
Tests
Manual test:
make bazel_preparego test --tags=intest ./pkg/executor -run TestGrantCreateUserWithStrictCompatibility80go test ./pkg/sessionctx/variable -run '^$'Side effects
Documentation
Release note