Skip to content

feat(tidb): fork catalog/completion/deparse/scope from mysql (PR3a scaffold)#99

Open
vsai12 wants to merge 1 commit intomainfrom
feat/tidb-catalog-scaffold
Open

feat(tidb): fork catalog/completion/deparse/scope from mysql (PR3a scaffold)#99
vsai12 wants to merge 1 commit intomainfrom
feat/tidb-catalog-scaffold

Conversation

@vsai12
Copy link
Copy Markdown
Contributor

@vsai12 vsai12 commented Apr 20, 2026

Summary

Mechanical fork of the four remaining MySQL packages into tidb/, preparing the ground for PR3b (TiDB-specific behavior). Pure import-path rename — no logic changes, no collation flip, no new fields.

Dependency chain that forces these four packages to ship together:

completion → catalog → scope
                    → deparse
deparse → scope
deparse (test-time) → catalog

None of the four compile in isolation, so all four must exist before any tests run.

What changed

  • tidb/scope/ (1 file)
  • tidb/deparse/ (5 files)
  • tidb/catalog/ (120 .go files)
  • tidb/completion/ (7 files incl. SCENARIOS)

Why this diff is 57k lines

Previous guidance favors ~500-line PRs. A mechanical fork is the pathological exception — splitting four interdependent packages across 4 PRs produces a chain of unmergeable branches that reviewers can't CI independently, which is harder to review, not easier. Reviewers should verify via CI + spot-check on a handful of files (e.g. tidb/catalog/catalog.go, tidb/deparse/resolver.go), not line-by-line. The behavioral changes land in PR3b, which will be a human-scale diff.

Scope guards honored

  • Collation default left at utf8mb4_0900_ai_ci — PR3b flips to utf8mb4_bin
  • No new fields on Table/Column/Constraint — PR3b adds them
  • MySQL-inherited walkthrough tests kept as-is — PR3b will annotate failures
  • mysql/semantic/ not forked (no Go package, metadata only)

Test plan

  • go build ./tidb/... clean
  • go vet ./tidb/... clean
  • go test ./tidb/... -short -count=1 — all passing (ast, catalog, completion, deparse, parser)
  • CI green on merge

Follow-up

PR3b (branch feat/tidb-catalog-extensions, branched off this commit) adds:

  • Collation flip to utf8mb4_bin
  • Table/Column/Constraint TiDB fields
  • AUTO_RANDOM / PLACEMENT POLICY / TTL / TIFLASH REPLICA / CLUSTERED wiring
  • TiDB completion keywords
  • pingcap/tidb:v8.5.5 container tests
  • Skip-annotations for MySQL-only inherited tests

🤖 Generated with Claude Code

…sql (PR3a)

Mechanical fork with import path renames only — no logic changes.
Collation default left at utf8mb4_0900_ai_ci (PR3b will flip to utf8mb4_bin).

Packages forked:
- tidb/scope/ (1 file)
- tidb/deparse/ (5 files)
- tidb/catalog/ (120 files)
- tidb/completion/ (7 files incl. SCENARIOS)

Verification:
- go build ./tidb/... — clean
- go vet ./tidb/... — clean
- go test ./tidb/... -short -count=1 — all passing

Prepares the 4 packages for PR3b, which adds TiDB-specific catalog
fields, option wiring, collation flip, completion candidates, and
container tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants