Skip to content

fix(parser): support SERIAL columns and bare table grants - #32196

Merged
XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
aptend:fix/astra-meow-31748-31804
Nov 5, 2026
Merged

XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
aptend:fix/astra-meow-31748-31804

Conversation

@aptend

@aptend aptend commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #31748
Fixes #31804

What this PR does / why we need it:

Accept SERIAL in MySQL column definitions as BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE, including ALTER TABLE ADD COLUMN. Keep its non-reserved identifier behavior and existing CAST, CONVERT and sequence-type boundaries. Preserve the existing unquoted serial(...) function-call AST after introducing the SERIAL token, including nested serial_extract, aggregates and generated composite-index SQL.

Allow GRANT and REVOKE to omit TABLE by constructing the same table-privilege AST as the explicit form. Preserve privilege levels, options and authorization denials. Update two legacy expected results that formerly rejected this now-supported syntax; account-privilege denial remains asserted. Role grants, proxy grants and WITH ADMIN OPTION are outside this change.

Validation:

  • Linearly rebased onto official main 692c8e1; all 11 delivery-file hashes are unchanged from the independently reviewed candidate. Independently reviewed all 11 changed files, canonical generation and real DDL, catalog, privilege and error consumers. Forced pinned generation passed; all lexical token IDs remain stable, including SERIAL=58142. Existing generated semantic actions are unchanged with one additional action matching the generic ID-call arm.
  • Owning parser packages passed using the repository CGO/native setup. Focused existing planner regressions passed with 31 RUN events and explain regressions with 5 RUN events, all original rc 0. Boundary tests cover SERIAL as a type and identifier and its restored function-call nesting.
  • A matching ab5-based CGO/SIMD build (binary SHA-256 4aa88cdffdabf2b6e9d21a70d27f6373cc51f9250c08e53e67978b7cb50617ff) passed SERIAL 28/28 and bare grants 56/56. The existing grant_privs_role case passed 226/226 after the two minimal expected-result corrections, with 0 failed, ignored or abnormal. These are actual mo-tester comparison runs with CI flags -n -g; result metadata is ignored. Real serial round-trip, composite unique-index backfill, duplicate error 1062 and NULL controls passed on the same private service topology.
  • Before SQL, checked process identity, the real ISCP-Task Start marker, full TCP/all UDP including UNCONN and the private HAKeeper, seed, raft and JDBC targets. Fresh bounded cleanup restored the saved global value and removed owned databases, users, roles and account; absence probes, original parent wait and full process/socket cleanup returned 0. Guard-terminated embedded-fixture attempts and two pre-SQL configuration/audit refusals are retained as unsuccessful attempts, not counted as passing tests.
  • Repository-pinned local SCA passed on the final 11-file content against main 692c8e1: make static-check STATIC_CHECK_PACKAGES=./... (original numeric rc 0, complete raw log and separate rc file retained). The grammar input triggers the documented full-graph fallback, including tests and reverse dependencies. The package graph, err-check, molint 35bd4d9a4055 and license-eye 0.4.0 header/dependency checks passed; golangci-lint 2.14.0 reported 0 issues and license headers 0 invalid files. The source-identical functional evidence above retains its actual ab5 binary identity; it is reused across the unrelated hashbuild/runtime-filter main change, not relabelled as a 692c service run.

Remote CI and review remain subject to the published HEAD. No multi-CN or deployment validation is claimed.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH

XuPeng-SH commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 4311fe84d50a509b1b202e0eebf530289c4202b6

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: 4311fe84d50a509b1b202e0eebf530289c4202b6

Assessment: approve

The grammar reuses canonical DDL and table-privilege ASTs while preserving SERIAL’s existing identifier and function roles. Generation and parser regressions pass; no actionable findings remain.

Model: gpt-6.1-sol / max

Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0

Validation:

  • Reviewed all 11 changed paths, both discussion entries, linked issues and relevant DDL/authorization consumers; source unchanged.

  • Canonical parser regeneration byte-matched. All 796 existing token constants and 2,049 existing action bodies were preserved, with four intended additions.

  • Both owning parser packages passed with Go 1.27.1, the assigned executor and a frozen-input repository jemalloc build. All 16 added top-level tests executed.

  • Audited 28 SERIAL and 56 bare-grant SQL/result statements, state/error oracles and the two intended legacy result changes.

  • Frozen-head CI: 13 successful, 14 skipped and 2 neutral checks, including build, UT, SCA/coverage and PROXY/PESSIMISTIC BVT. Receipts and logs reconciled in validation-ledger.json.

Limitations:

  • No fresh local SQL/BVT or planner/explain runs. Author service evidence retains its stated older-base binary identity; raw author logs were not supplied.

@mergify mergify Bot added the queued label Nov 5, 2026
@mergify

mergify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue · pull request dequeued

1 h 16 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Thu 5 Nov, 00:47 · rule main · triggered by rule Automatic queue on approval for main
  • ⏹️ Testing stopped · in place
  • 🚫 Left the queue 02:03 · 5cfcb40

Reason

Pull request #32196 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

To get back in the queue

  • Push a change if one is needed: the pull request is queued again once its queue conditions match.
  • If no change is needed, tick the box below to queue it again as it is.

Merge conditions not met when it left the queue

  • any of · required by GitHub branch protection:
    • check-neutral = CI Required
    • check-skipped = CI Required
    • check-success = CI Required

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request
2 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection

Times in UTC · dashboard · how the merge queue works

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch was successfully deployed

No deployments
ci — 5cfcb401 Deployed Nov 5, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dequeued kind/bug Something isn't working kind/test-ci size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: GRANT/REVOKE reject MySQL-standard bare db.table syntax [Compatibility]: SERIAL type alias is rejected by the parser

4 participants