planner, executor, ddl: normalize materialized view log privilege targets and checks#68819
Conversation
…sages Signed-off-by: Zhigao TONG <tongzhigao@pingcap.com>
… dedicated function Signed-off-by: Zhigao TONG <tongzhigao@pingcap.com>
…IZED VIEW LOG actions and action-specific privilege checks Signed-off-by: Zhigao TONG <tongzhigao@pingcap.com>
📝 WalkthroughWalkthroughThis PR refactors how materialized view log (MLOG) tables are named and authorized across the system. A new centralized helper replaces scattered ChangesMaterialized View Log Privilege and Naming Consolidation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Hi @solotzg. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature/release-8.5-materialized-view-2603 #68819 +/- ##
===============================================================================
Coverage ? 22.4152%
===============================================================================
Files ? 1712
Lines ? 645154
Branches ? 0
===============================================================================
Hits ? 144613
Misses ? 482441
Partials ? 18100
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/retest |
|
@solotzg: PRs from untrusted users cannot be marked as trusted with DetailsIn response to this:
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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gengliqi, windtalker 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 |
[LGTM Timeline notifier]Timeline:
|
|
/override idc-jenkins-ci-tidb/mysql-test pull-br-integration-test pull-unit-test-ddlv1 idc-jenkins-ci-tidb/check_dev idc-jenkins-ci-tidb/check_dev_2 idc-jenkins-ci-tidb/unit-test |
|
@windtalker: Overrode contexts on behalf of windtalker: idc-jenkins-ci-tidb/check_dev, idc-jenkins-ci-tidb/check_dev_2, idc-jenkins-ci-tidb/mysql-test, idc-jenkins-ci-tidb/unit-test, pull-br-integration-test, pull-unit-test-ddlv1 DetailsIn response to this:
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. |
e8c6e40
into
pingcap:feature/release-8.5-materialized-view-2603
What problem does this PR solve?
ref #68518
Problem Summary:
Materialized view log privilege checks were not fully consistent across planner/executor/DDL paths:
$mlog$...name construction, which risks divergence.ALTER MATERIALIZED VIEW LOGcolumn-level actions were missing in key paths.What changed and how does it work?
model.MaterializedViewLogTableName(...).PURGE MATERIALIZED VIEW LOGexecutor-sideOPERATE VIEWverification on resolved MLog.ALTER MATERIALIZED VIEW LOGactions and action-specific privilege checks.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit
Release Notes
CREATE VIEW,DROP,ALTER, andSHOW VIEWare now correctly checked against the materialized view log object itself, rather than against base tables or dependent materialized views, providing more consistent and predictable authorization behavior.