Repository navigation
Description
Existing issue search:
- I have searched existing issues to avoid duplicates
Branch Name: main
Commit ID: e2459cc55f4b514893e19732743460bc5f16d552 (2026-11-09)
Environment: Local single-node launch (CN + TN + LogService in one process tree), macOS arm64, freshly compiled from current main, clean catalog.
Actual Behavior:
SHOW GRANTS FOR ROLE <role> (and SHOW GRANTS FOR <user>) renders the granted object as the literal placeholder d.t instead of the actual database.table:
mysql> SHOW GRANTS FOR ROLE r_showv;
+-------------------------------------+
| Grants for r_showv |
+-------------------------------------+
| GRANT select ON table d.t `r_showv` |
+-------------------------------------+
The storage layer is correct — joining mo_catalog.mo_role_privs.obj_id against mo_catalog.mo_tables.rel_id resolves the true object (bh1 / t). So this is purely a rendering defect in the SHOW GRANTS output construction.
Impact: Privilege auditing is blind — from the SHOW GRANTS output alone, an auditor cannot tell which table (or database) a grant applies to. For accounts with many table-level grants the output is useless for review, and any tooling parsing SHOW GRANTS cannot determine the object.
Expected Behavior:
SHOW GRANTS FOR ROLE r should render the actual qualified object name, e.g.:
GRANT select ON table bh1.t TO `r_showv`
as MySQL does (GRANT SELECT ON bh1.t TO ...).
Steps to Reproduce:
-- 1. Grant some privilege on a real table
CREATE DATABASE bh1;
CREATE TABLE bh1.t (id INT PRIMARY KEY);
CREATE ROLE r_showv;
GRANT SELECT ON TABLE bh1.t TO r_showv;
-- 2. Render the grant
SHOW GRANTS FOR ROLE r_showv;
-- → GRANT select ON table d.t `r_showv` ❌ object shown as literal "d.t"
-- 3. Prove the storage is correct (as root)
SELECT rt.reldatabase, rt.relname
FROM mo_catalog.mo_role_privs rp
JOIN mo_catalog.mo_role r ON rp.role_id = r.role_id
LEFT JOIN mo_catalog.mo_tables rt ON rp.obj_id = rt.rel_id
WHERE r.role_name = 'r_showv';
-- → reldatabase='bh1', relname='t' ✓ stored fine; only display is wrongSeverity: Diagnosability/audit — no data corruption, but SHOW GRANTS is the primary tool for reviewing what was granted; with d.t placeholders the review is impossible. Low-risk fix (string construction in the SHOW GRANTS response path).
Cross-reference: Verified at least 3 times on 2026-11-09/10 against current main e2459cc55f. Also reproduced for user grants (SHOW GRANTS FOR u_test). Possibly shares a root cause with the view-grant enforcement defect (view grants also render as d.t).
Activity
[-][Bug]: SHOW GRANTS renders granted objects as literal placeholder "d.t" instead of actual database.table[/-][+][Bug]: SHOW GRANTS renders granted object as literal 'd.t'[/+]fix(sql): reject column privileges and render granted object scopes (#…
XuPeng-SH commentedon Nov 13, 2026
QA handoff (main, not acceptance)
Merged fix: #32649, main merge SHA
2573b2895bb73af99c95960c2f5595edde7b62b1(reviewed PR headfb85c8024e5401e6a627ff2e6fda1d4ab71aa85a). SHOW GRANTS now resolves actual relation/database names from current-account catalog identities, including logical relation IDs, instead of printing thed.ttoken. Role/user membership and global or unresolved-object fallback remain unchanged; output is stably ordered and resolved identifiers are quoted.Evidence reviewed: merged scope-resolution changes and committed planner/BVT regressions; author-reported seven directed SHOW GRANTS expected/actual groups and six canonical BVT scripts (992 successful, 18 existing-issue skips, 0 failed/abnormal); the same-head review reports 9 focused frontend/planner roots / 16 executions passing without skips. These are remote author/reviewer reports, not this run's local tests. Raw per-case artifacts were not independently checked here, and a fresh main server/BVT run was not performed.
Complete issue/PR discussion contains no current applicable verified counterexample or unfinished development follow-up. Handing to @Ariznawlll for QA, keeping the issue open pending acceptance. Suggested boundaries: SHOW GRANTS for roles and users; table/view exact scopes, database scopes and db-bound wildcards; same-name objects across accounts; quoted identifiers; logical identity after supported table changes; unchanged global/unresolved fallback and role membership. This is a rendering fix, not a claim of new direct-user object-grant or column-authorization semantics. No 4.2 backport is requested by this handoff.
slyunnn commentedon Nov 16, 2026
Regression and extended verification for #32446 (2026-11-16)
Verification Environment
Latest fetched
origin/main4349e7321825639c0f9001e4271df278127060cf—perf(objectio): compress directly into available writer arena (#32774). Native2 CN / 1 TN / 1 Log service / Proxy; Proxy6001, CN116001, CN216002were connected and each ran the regression. The binary andgit_version()matched the checkout. MySQL protocol via PyMySQL; serial MOTR-j 1.What Was Covered
4.2-devand released-server compatibility were not tested.Findings
Fix PR #32649 —
fix(sql): reject column privileges and render granted object scopes— merged as2573b2895bb73af99c95960c2f5595edde7b62b1and is in the verified main history. Large-data regression is unnecessary: the issue concerns catalog identity rendering rather than data scale or parallel execution.MOTR / BVT Coverage
Source commit
835ef240442c39fe3b5bdf69d008cc5f12521785was recorded, replayed and pushed; daily cherry-pick242fde750ed7b1dba7050821b97c584b054b22d2is in MOTR PR #347.Final Conclusion
Fixed on the verified
maincommit.