You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GRANT SELECT ON db.* is rejected without the optional TABLE keyword #30874
GRANT ... ON <db>.* TO <user> is rejected; the object type keyword TABLE is mandatory. MySQL accepts the form without it.
Repro (main@3ad9adbb4c)
createuserif not exists qa_u1 identified by 'Pwd123!@#';
grantselecton qa2.* to qa_u1;
-- ERROR 1064 (42000): SQL parser error ... syntax error at line 1 column 19 near " qa2.* to qa_u1"grantselecton table qa2.* to qa_u1; -- accepted
Expected
MySQL 8.0 grammar is GRANT priv ON [TABLE|FUNCTION|PROCEDURE] {tbl_name|*|*.*|db.*} TO user — the object type is optional, so GRANT SELECT ON db.* must parse. Tooling and ORMs commonly emit the short form for schema-level grants, so this breaks scripts that work on MySQL.
Reproduced identically on window base 7b911aea68 — pre-existing compatibility gap, not a regression from the last 100 commits.
按流程把本 issue 交给该修复 PR 的作者跟进(单一 assignee),等 #30875 解决冲突、拿到 review 与有效 CI 并合入 main 后,我再在本地按原始复现做验收,通过才会转测。
复现(供 rebase 后自测):
createuserif not exists qa_u1 identified by 'Pwd123!@#';
grantselecton qa2.* to qa_u1; -- 期望成功;当前 1064 near " qa2.* to qa_u1"grantselecton table qa2.* to qa_u1; -- 现状可用的绕行写法
Status update: #30875 currently conflicts with main. It is being updated against current main (merging main and regenerating the parser), after which CI will be re-run and review re-requested. I will post here once that is done.
Both reports cover the MySQL-compatible GRANT <privileges> ON db.* ... form being rejected unless the optional TABLE keyword is supplied. The SELECT ON db.* reproduction, explicit-TABLE control, and unmerged #30875 status are retained on #30626.
Administrative consolidation only; this does not mean the parser gap is fixed or QA-verified.
Activity
XuPeng-SH commentedon Oct 22, 2026
Tracking note: the fix for this issue is PR #30875 (
fix(parser): accept GRANT/REVOKE without object type (default TABLE)), which is not merged yet:REVIEW_REQUIRED(无批准)skipping,等于没有有效 CI 结果mysql_sql.y与生成物)因此本 issue 保持 OPEN,不转 QA:
main@3ad9adbb4c上仍可复现(GRANT SELECT ON db.*→1064),QA 没有可验证的合入点。按流程把本 issue 交给该修复 PR 的作者跟进(单一 assignee),等 #30875 解决冲突、拿到 review 与有效 CI 并合入 main 后,我再在本地按原始复现做验收,通过才会转测。
复现(供 rebase 后自测):
MatrixAdventurer commentedon Oct 26, 2026
Status update: #30875 currently conflicts with main. It is being updated against current main (merging main and regenerating the parser), after which CI will be re-run and review re-requested. I will post here once that is done.
MatrixAdventurer commentedon Nov 20, 2026
2026-11-20 整理结论:此前进度称 #30875 正在解决冲突;现核对其已关闭且未合并,不能据此认定 GRANT 可选 TABLE 语法已修复。本单保留开放,需要新的有效修复 PR 与解析器回归证据。
由LW授权的ChatGPT Business智能体提交。
XuPeng-SH commentedon Nov 29, 2026
Closing as duplicate of #30626, item A.
Both reports cover the MySQL-compatible
GRANT <privileges> ON db.* ...form being rejected unless the optionalTABLEkeyword is supplied. TheSELECT ON db.*reproduction, explicit-TABLEcontrol, and unmerged #30875 status are retained on #30626.Administrative consolidation only; this does not mean the parser gap is fixed or QA-verified.