Repository navigation
fix(sql): persist charset defaults and implement table conversion - #29374
Conversation
Implement ALTER DATABASE charset/collation semantics for issue matrixorigin#28998, including transactional catalog ownership, CREATE inheritance, execution-time generation checks, tenant upgrade, and restore support. Add regression coverage for PR matrixorigin#29023 review findings and public character results.
# Conflicts: # pkg/defines/const.go
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: f5a7f214a83c6ecc1e767156f4e371047cf79219
Assessment: request_changes
The catalog and DDL ownership design is reasonable, and the previous protocol/function allocation conflict is resolved. However, a public SQL reproduction confirms that CONVERT can silently change stored generated values using unrelated session settings.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0
- P1
pkg/sql/plan/alter_table_charset.go:127: Create a stored generated VARCHAR column from decimal division with div_precision_increment=10, insert data, change div_precision_increment to 0, then CONVERT the table to its existing charset and collation.
Impact: ModifyColumn rebinds the persisted generated expression using the current session. The subsequent COPY silently changes existing data, even though the character domain is unchanged. Preserve unaffected persisted expression semantics while adapting conversion types, and add a regression through the SQL entry point.
Evidence: At the assessed head, CREATE TABLE t(a DECIMAL(10,2), b DECIMAL(10,2), g VARCHAR(64) GENERATED ALWAYS AS(a/b) STORED) COLLATE utf8mb4_bin followed by INSERT INTO t(a,b) VALUES(1,3) produced g='0.333333333333'. After changing division precision and executing ALTER TABLE t CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin, g became '0.33'. TestReviewConversionPreservesExpressions failed with this exact mismatch. Controls passed for unchanged session precision and for ordinary ADD COLUMN ALGORITHM=COPY after changing precision. The later persisted-expression replay requires expression equality, which this new rebinding has already broken.
Validation:
-
Reviewed the complete delta, surrounding owners/callers, supplied comments, design, tests and SQL expectations. Database-ID-scoped transactional metadata avoids mutable SQL-text authority and additional caches; existing DDL locks, retry and COPY owners are appropriate.
-
Verified protocol 113, migration 4.0.15, CreateTable field 18 and function ID 598 preserve the base allocations, resolving review 5498083714.
-
Preflight passed. Recovered compatible native dependencies after verifying 192 input files, 62 artifacts and the original build-owner receipt/log. Tests used Go 1.27.1, assigned caches and the supplied test-exec.
-
The public SQL regression failed with exit 1; receipt checks/1792005531637531138-4.json matches conversion-probe.log. Both controls passed with exit 0; receipt checks/1792005741508022321-4.json matches conversion-controls.log.
-
Generated-artifact audit passed: existing protobuf descriptors remain compatible, and parser semantic-action changes match the grammar additions. Receipt checks/1792005533638101974-4.json matches generated-audit.log.
-
Frozen evidence reports successful Ubuntu UT, coverage, static analysis, proxy BVT and pessimistic multi-CN BVT for this head. These results do not cover the demonstrated counterexample.
-
Final receipt/log reconciliation passed and confirmed unchanged source. Scripts, overlays, logs, provenance and artifact hashes are retained under /home/xupeng/.local/state/mo-bot/jobs/b555579c6bb1c355b827acb0/attempt-1; see review-evidence.json and final-audit.log.
Limitations:
-
local_validation was empty; raw CI and author validation logs were not supplied. Their aggregate test counts were not independently verified, and broad suites were not rerun.
-
Linked issue bodies were unavailable in the frozen evidence; their requirements were assessed through the supplied PR and versioned design.
-
No throughput comparison was performed. Inherited CREATE adds catalog reads, CONVERT rebuilds rows/indexes, and ordinary read-only transactions now enter lock-service cleanup. Source tracing found no new database-default lookup per ordinary SELECT/DML row.
iamlinjunhong
left a comment
There was a problem hiding this comment.
Reviewed head f5a7f214a83c6ecc1e767156f4e371047cf79219 against the supplied complete PR diff (143 files). Synchronized the PR head and origin/main (ddb76ea12cc05ac7517c026fa237516865f86c2b) into an object-only repository and verified all 143 changed blobs against the head tree.
No confirmed actionable findings remain from this review. The previous review's protocol/function allocation conflict is resolved: C03 uses protocol 113 and INTERNAL_TABLE_COLLATION=598, preserving main's protocols 110–112 and function IDs 596–597.
Inspected database-default catalog ownership and lifecycle, inheritance and prepared-plan rebuilding, lock-time generation validation, ALTER DEFAULT versus CONVERT/COPY, generated expressions and destination assignment, index/FK admission, metadata projections, restore/clone identity remapping, and bootstrap/migration compatibility. Reviewed the associated unit, SQL integration, two-CN, recovery, restart, upgrade, and distributed SQL tests and expected results. Candidate concerns were excluded when their proposed trigger was unsupported or existing call-chain guards preserved the behavior.
The captured 31 checks are complete: 14 success, 15 skipped, and 2 neutral; there are no failed checks. Captured mergeability is MERGEABLE, with merge state behind. This is a code and test-evidence review; native package tests and SQL integration suites were not rerun locally.
Recommendation: APPROVE.
aptend
left a comment
There was a problem hiding this comment.
Re-review of exact head f5a7f214a83c6ecc1e767156f4e371047cf79219, base/merge-base fcad62a8ff06000e682824802f1155cbeea02a2f.
Two blocking issues remain:
- P1: same-domain CONVERT silently changes stored generated values when the current session's division precision differs from CREATE time. Independently reproduced through the real MySQL SQL entry point, not inferred from another review. Both rounds change
gfrom0.333333333333to0.33; unchanged-precision CONVERT and changed-precision ordinary ADD COLUMN ALGORITHM=COPY both preserve it. - P1: protocol 113 no longer identifies C03 capability. Already-merged official main
17a6200f59e764729e5544908fffd5480ae88279assigns 113 to DECIMAL variance/stddev (#30228, merge8c8f829f9d3e9576d3b7371333e0eb1147a008e4) and lacks C03. Current DDL and all-CN persistent-upgrade admission nevertheless accept it. The current 113/112 negative control does not test this actual unsupported 113 peer.
History/closure: read all three existing reviews (including the conflicting approval), all conversation comments, and confirmed no inline comments or review threads. Compared against my previous reviewed head a2ced2be4e322aea81b8eb075536f5a1b2d5e640, separating upstream merges from C03 changes, and mapped the current 143-file scope. The old function-ID collision is genuinely fixed: upstream FORMAT_BYTES596/FORMAT_PICO_TIME597 are preserved and C03 uses598. Migration4.0.15 and CreateTable.database_defaults18 preserve their base allocations. The old protocol110 collision was moved to113, but subsequent merged main has now occupied113 too; this finding is against merged main, not hypothetical ordering among open PRs.
Design: read the complete 266-line versioned C03 design, blob e19b5f2ef84ced5cf7a1193f54ad40f018c369dd, SHA-256 07aae3446fdcee7f65110d6703fed6ee004a96b916d525d53e503d64ebe47189. Its recorded r1 approval is not treated as missing merely because it lacks a special GitHub label. Its explicit unoccupied-protocol/all-node-admission invariant is currently violated; the approved COPY/replay ownership also does not authorize rebinding unrelated persisted arithmetic policy. These concrete failures stop implementation approval. I inspected the affected planner/replay/strict assignment, DDL/default ownership, migration/admission and upstream legacy-default consumers; this is not a claim that every unrelated recovery/concurrency hunk in all 143 files has received a new exhaustive implementation audit.
Independent validation, Go1.27.1 Linux/amd64, exact-head detached worktree, repository CGo wrapper with provenance-checked read-only primary native artifacts:
TestReview29374ConversionKeepsPersistedExpression: actual embedded service, six named subcases across two rounds on one instance; four controls PASS, two same-domain-conversion assertions FAIL. Package terminal FAIL5.744s. Source SHA-256f3db9eecd0407b244ce6cfe0661cfc52fc921ea62359ffb025e200986744cf43. Schema cleanup and service/admission/port teardown completed.TestReview29374MergedMain113MustNotAdmitC03, count2: both DDL-enabled and all-CN-upgrade rejection assertions FAIL in each run. Real admission owners reject112 and a hypothetical fresh114 floor rejects main113. This is a bounded admission test plus exact-main source comparison, NOT an executed rolling-upgrade cluster. Source SHA-2565c80d2871ddc40b2a9c6586d5db56e56f6d76dfd82e73a854d31f8b159f7ce07.- Current CI Required is SUCCESS (run38594885045); I did not rerun whole packages/BVT/race/restore suites or independently reconcile the author's aggregate coverage/performance counts. Green existing checks do not cover the reproduced counterexample.
Please preserve unaffected persisted expression semantics during conversion, allocate a fresh cumulative C03 epoch above committed main's capabilities consistently across authoring/loaders/sysviews/migration/restore/tests, and add both regressions.
aptend
left a comment
There was a problem hiding this comment.
Re-review of exact head f53bbf18cad9b67561dd3b6b58fe2046ba6fff34, base/merge-base 501c85ecdd6eee0195172743c6d8aaf125cb252d.
The two issues in my previous review are fixed. C03 now uses114 and rejects actual main113 before its DDL/migration writes, while preserving main's DECIMAL113 and function596/597 allocations. The real SQL generated-expression regression now passes twice, including unchanged-session CONVERT, changed-session ordinary COPY, same-domain CONVERT, changed-domain CONVERT, and subsequent inserts: the persisted value remains 0.333333333333.
One distinct P2 compatibility gap remains: newly registered function598 can be published in a persistent view while the CN/admission floor is113. The shared expression protocol detector does not recognize it, and the resulting view has no required-protocol marker. Main113 does not register this function. See the independently reproduced inline finding; this is not the previous epoch-number collision repeated.
History and scope: read all four prior formal reviews, both inline comments, the complete discussion and both resolved/outdated threads; no author thread replies or newer review were present. Compared with reviewed f5a7f214a83c6ecc1e767156f4e371047cf79219; of the current149-file map,99 blobs are byte-identical. Read the complete current non-generated production/grammar/proto diff (59 files), the conversion/replay owners and tests, migration/restore/metadata consumers, transaction cleanup and relevant callers; separated upstream merges/parser maintenance from C03 changes. Generated artifacts and unchanged historical suites are not claimed as a new exhaustive generation/recovery/race qualification.
Design gate: accepted the recorded r1 approval and its compatible amendments, current design blob 562d55f5a4725d1ab98c5bd69cd34e80b763f299, SHA-256 5b740931fad1f08625a8f015d7920c89476185fa23f83356edd27ec6b512ada4. No extra approval label is required. The new finding concerns its actual all-node expression/persistence capability contract.
| Unhappy-path contract | Inspected result |
|---|---|
| Q1: cleanup ownership | Catalog query results are closed; COPY/publication and rollback retain existing transaction owners; conversion replay uses invocation-local copies. No new confirmed cleanup bug. |
| Q2: termination | Existing DDL locks/cancellation retained; readonly/indeterminate lock cleanup is no longer bypassed, and RC waits require a real commit timestamp. |
| Q3: bounds | One defaults row per account/database identity; no new resident cache/worker. Retargeted assignment wrappers are reused instead of accumulating across CONVERT. |
Independent validation, Go1.27.1 Linux/amd64, detached exact-head worktree, own make -j4 cgo build and repository CGo wrapper:
- Selected planner/replay/DDL-admission tests PASS0.079s; migration test PASS0.032s, including114/113 rejection with zero writes; selected PB checks PASS0.014s.
- Real MySQL-entry
TestCharsetConversionPreservesExpressionSemantics, count2: both rounds/all8 named subcases PASS, package8.059s; existing and future rows asserted. - New diagnostic
TestReview29374NewFunctionProtocol, repeated count2:113 rejection assertion FAILS each time because CREATE VIEW succeeds with a nil minimum marker;114 control PASS. Package FAIL0.052s. Probe SHA-25677cb71231da743702ad2250f3a758005ac1580e4b32daf8d3778e01cf541c77d. - New real-SQL diagnostic
TestReview29374FunctionAdmissionSQL, count2: public version RPC sets113; legacy view passes and C03 ALTER rejects, but the new-function view commits and reads successfully in both rounds;114 positive control also passes. Intentional preservation assertions FAIL, package11.093s. Probe SHA-25686445a20fde655145484ab342118af8a92d377ecdf2f324ef839b0d03aafcf34. Protocol restoration, schema/service cleanup and both probes' removal completed. - Additional current PB wire-contract, strict binary capacity/masked-row, function-protocol and sysview selections PASS (PB0.012s/function0.038s/sysview0.084s).
- This is actual new-binary SQL execution plus a bounded planner/admission check and exact-main source comparison, not an executed mixed-binary rollout. Old-reader incompatibility follows from main113 lacking this function registration.
- Current Linux run38694936349 is still in progress (ordinary UT queued at the latest check); no new-head CI-green, full BVT/race/restart/upgrade claim is made. Author Darwin counts remain scoped author evidence, not independently rerun aggregate totals.
Tracked worktree is clean; head/state are checked again immediately before posting.
Coordinate C03 protocol117 and function599 with upstream native UNIQUE, calendar and division contracts. Fix derived-view transaction mode, authenticated migration context and downgraded metadata checks. Preserve native UNIQUE schema markers across DEFAULT changes and synchronize one approved CONVERT rejection oracle.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 05d97d39697fc7adc0b5719f3f297490c9664376
Assessment: request_changes
Reviewed the complete 166-file delta and surrounding ownership paths. Database-ID-owned defaults and reuse of transactional COPY are reasonable, but CONVERT still silently changes persisted generated-expression semantics when a converted text dependency invalidates replay.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
- P1
pkg/sql/plan/alter_table_charset.go:136: Set div_precision_increment=10; create t(v varchar(8), a decimal(10,2), b decimal(10,2), g varchar(64) generated always as(concat(v,a/b)) stored) collate utf8mb4_bin; insert ('x',1,3) into (v,a,b). Set div_precision_increment=0, then ALTER TABLE t CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci.
Impact: CONVERT silently changes the existing g value from 'x0.333333333333' to 'x0.33'; subsequent inserts also use the shortened arithmetic. Changing a character collation must preserve unrelated persisted arithmetic semantics. Preserve unaffected expression bindings while adapting affected character operations, and add a regression covering existing rows and future inserts.
Evidence: Changing v's collation makes ddl_expression_replay.copyExpr reject the entire generated expression. charsetConversionExpressions then supplies no generated binding, so ModifyColumn calls buildGeneratedExpr using the current session. The public SQL probe reproduced this on the frozen head: dependent-expression-v2.log:1184 reports total=2 changed_rows=2. Ordinary COPY, same-collation CONVERT, and unchanged-precision controls pass. Receipt checks/1792138856764971947-4.json records exit 1; the retained overlay only appends the diagnostic test.
Validation:
-
Confirmed the assigned checkout and native build clone remain clean at the frozen head. Reviewed production, tests, documentation, SQL fixtures, generated changes, and prior review concerns.
-
Isolation preflight passed. Recovered native prerequisites only after matching Makefile/cgo/thirdparties inputs and verifying provenance through the current repository owner.
-
Four targeted SQL integration tests passed: TestDatabaseCharsetInheritanceContract, TestDatabaseDefaultsFailureAndRecovery, TestCharsetConversionPreservesExpressionSemantics, and TestTableCollationViewProtocolSQL. Package completed in 12.259s; receipt checks/1792138730130608150-3.json matches sqlintegration.log.
-
Two retained diagnostic runs reproduced the conversion defect. The second additionally verified future inserts and three passing controls; both completed with assertion failures, not setup failures.
-
Generated-file audit passed: protobuf descriptors contain only the declared defaults additions; four other protobuf files differ only in compressed descriptor bytes. Parser action changes match the grammar additions.
-
Command, source, exit and log reconciliation is retained in /home/xupeng/.local/state/mo-bot/jobs/b0059607a8263cf495366a1a/attempt-1/review-evidence.json. Final audit receipt checks/1792139158172413321-4.json records exit 0; the earlier audit's log-decoding failure remains retained separately.
Limitations:
-
evidence.json.local_validation is empty. Frozen CI reports successful checks, but raw CI logs and the author's broader validation artifacts were not supplied; their aggregate claims were not treated as independently verified execution.
-
Local execution covered selected production SQL paths, not the complete race, multi-CN, restart or upgrade matrices. Linked issue bodies were absent; behavioral requirements were assessed from the supplied PR, comments and design document.
-
No performance benchmark was run. Source tracing identifies additional DDL catalog/locking work, schema replay allocation and COPY/index rebuild costs, without a new per-row defaults lookup in ordinary SELECT/DML. Shared transaction-cleanup overhead remains unmeasured.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Re-reviewed exact head a27d30c against merge-base a322466. APPROVE: no confirmed actionable blocker remains in the reviewed scope.
The ownership/design is sound: account/database-ID-owned metadata is the authority; prepared CREATE rebuilds and checks identity/generation under the existing database lock; DEFAULT remains metadata-only; CONVERT reuses transactional COPY, assignment validation and index/constraint rebuilding. Typed replay now adapts changed character operations without re-authoring unrelated arithmetic or removing authored CAST/COLLATE boundaries. Recovery preserves source defaults at database granularity and remaps destination identity. No additional resident cache, background worker or parallel transaction state machine is introduced.
All six prior reviews and the discussion/three resolved threads were checked. The old protocol/function collisions are resolved by protocol118/function600, preserving main117/function599. Shared expression/persisted-view/send/receive gates cover the function. Both historical generated-expression counterexamples, including concat(v,a/b), now pass through the real SQL entry point for existing rows and subsequent inserts.
Reviewed the complete non-generated production delta and relevant callers, the new/changed behavioral tests and SQL expectations; separately mapped implementation (67 files,+2001/-138), tests/fixtures (92,+8537/-2764), docs (2,+661), and generated output (6). Repeated golden formatting was audited separately from semantic result changes. Parser regeneration through the repository goyacc owner is byte-identical. Decoded protobuf descriptors preserve existing fields/enums/reservations and add only DatabaseDefaults plus fields CreateDatabase5/AlterDatabase3/CreateTable18; four other PB files differ only in compressed descriptor encoding.
Independent local validation, Go1.27.1 Darwin/arm64, exact detached head, native build plus repository CGo wrapper:
- Four actual SQL integration tests PASS, package12.023s: inheritance, conversion-expression semantics, failure/recovery and persistent-function protocol admission.
- Independent adjacent SQL probe PASS, package6.911s: native Unicode IN-list comparison changes while arithmetic/explicit COLLATE remain stable, combined ADD FIRST remaps columns, future inserts agree; an invalidating CHECK conversion rolls back and leaves the original constraint/table usable.
- Two-CN prepared freshness, concurrent version updates, cancellation/lock-waiter cleanup and same-name database recreation PASS, package7.170s.
- Selected planner/compiler/function/PB/migration/transaction cleanup tests: all six packages PASS (367 pass events including subtests/package terminals).
The first adjacent probe incorrectly assumed legacy general_ci revision0 would provide native case folding; source and existing compatibility contract reject that assumption. That discarded oracle is retained separately, not reported as a product bug. The final probe uses executable Unicode collation and independently verifies fresh-table comparison/CHECK controls.
Q1: borrowed executor results and local AST/replay state retain explicit cleanup; COPY rollback retains the transaction owner. Q2: actual cancellation removes waiters, and empty CommitTS no longer creates a logtail self-wait. Q3: one defaults row per database identity and bounded conversion coercion depth, with no new unbounded resident state.
Performance scope: no new per-row database-default lookup in ordinary SELECT/DML. CREATE/metadata/recovery gain catalog work, CONVERT deliberately rebuilds data/indexes, and ordinary pessimistic readonly finalization now enters local lock-service cleanup to cover indeterminate ownership. No TP throughput benchmark was run; this approval does not claim zero measurable overhead. The author's broader coverage/BVT/race/restart claims were not relabeled as independent reruns, and this run does not qualify a live mixed-binary upgrade or whole-repository CI.
Merge Queue Status
This pull request spent 3 hours 27 minutes 43 seconds in the queue, including 1 hour 1 minute 19 seconds running CI. Required conditions to merge
|
gouhongshen
left a comment
There was a problem hiding this comment.
Codex automated review
Reviewed the full 167-file delta (28,385 additions) of a27d30c against origin/main, and reloaded the PR's 7 formal reviews, issue comments, and the 3 inline threads in this turn. All previously raised blockers are verifiably resolved at this head: C03 now uses protocol 118 and INTERNAL_TABLE_COLLATION=600 preserving main's 110-117/596-599 allocations; the new function is fenced everywhere (persisted-expression RequiredProtocolVersion, remote destination, and send/receive gates all map TableCollationFunction to v118), closing aptend's function-not-gated inline; the protocol-113-collision inline is moot at 118; and CONVERT now adapts persisted typed expressions via charset_conversion_replay.go/ddl_expression_replay.go with fail-closed binding errors instead of rebinding generated/default expressions against the current session, addressing both prior session-variable counterexamples (a/b and concat(v,a/b)) that reviewers reproduced. I independently audited the defaults catalog lifecycle (ID-owned rows, exclusive ALTER DATABASE vs shared CREATE TABLE mo_database locking, plan binding plus lock-time revalidation, prepared-plan rebuild invalidation), CONVERT algorithm forcing and INPLACE rejection, in-place ReplaceDef publication of DefaultCharset/CollationVersion in disttae, the txn unlock change (read-only workspaces now always ask lockservice to unlock; RC waits only for a real commit TS; both unit-tested), restore/snapshot/PITR/clone defaults propagation with MO_TS existence fallback, per-account table lifecycle on account create/drop, privileges for ALTER DATABASE, sysview migrations, and the extensive new unit/SQL coverage. Two new non-blocking upgrade-window findings below; nothing else actionable. Limitation: focused unit tests could not run here because native CGo headers (xxhash.h, roaring.h, usearch.h, jemalloc.h) are unavailable in this environment, so verification was static; no failure was attributed to the PR without code-level evidence.
P2 - Protocol gate checks capability, not tenant migration state: unmigrated tenants get transient hard DDL/metadata failures during the 4.0.15 upgrade window (pkg/sql/plan/database_defaults.go:235)
GetDatabaseDefaults gating only requires MOProtocolVersion >= 118, then runs a raw SELECT on mo_catalog.mo_database_defaults and propagates any error to the caller (compile.readDatabaseDefaults and the live frontend variable read have the same shape). Per-tenant upgrades are asynchronous (asyncUpgradeTenantTask, one txn per tenant), and the v4_0_15 entry creates the physical table only when that tenant's HandleTenantUpgrade commits. The v4_0_15 handler itself is gated RequiredProtocolVersion 118, so migration necessarily runs after protocol is raised cluster-wide, while further tenants are still queued; a new CN also reports Latest (118) from SetupServiceBasedRuntime. In that window, CREATE TABLE, CREATE DATABASE, ALTER DATABASE, SHOW CREATE DATABASE, and character_set_database/collation_database reads in not-yet-migrated tenants fail with a missing-table error where main succeeds. Only the snapshot restore path has an existence fallback (readDatabaseDefaultsForRestore checks mo_tables); the live path deliberately treats a missing table as a hard failure. Impact is bounded: errors are explicit, retriable, self-resolve as each tenant's entry commits, and cannot corrupt metadata since every write rolls back with the failing statement, so this is non-blocking; but deployments with large account counts will see DDL unavailability proportional to fleet size during rollout. Consider tolerating a missing table as legacy (Version 0) in the live read, or gating on the per-tenant 4.0.15 version marker rather than the protocol floor alone.
P2 - CREATE DATABASE with charset/collation options now hard-fails below protocol 118 (previously silently accepted like MySQL); ENCRYPTION is rejected at all protocols (pkg/sql/plan/build_ddl.go:6097)
buildCreateDatabase now returns RequireDatabaseDefaults whenever DatabaseDefaultsEnabled is false and the statement carries any CreateOptions. On main these standard MySQL clauses (e.g. CREATE DATABASE d CHARACTER SET utf8mb4 COLLATE utf8mb4_bin, common in import/init scripts and dumps) were validated then silently ignored. During a mixed rolling upgrade where deployment pins MOProtocolVersion to the oldest live CN, statements hitting a new CN now fail while older CNs still accept them, until the rollout completes and the version is raised. In the same path NormalizeDatabaseDefaults rejects CreateOptionEncryption unconditionally, so CREATE DATABASE d ENCRYPTION = Y now fails even at 118 where main silently succeeded; that part is a defensible fail-closed improvement but is a behavior change worth documenting. The fail-closed choice on the protocol side is consistent with the PR's admission design (a silently dropped COLLATE would otherwise diverge a database's displayed default from its persisted one), and both effects are transient per rollout with no divergence once 118 is reached, so this is reported as non-blocking operator-facing compatibility information.
|
Independent current-main functional verification at 4.2-dev ac27db3 still rejects the reported ALTER DATABASE statement with 1064 through actual MySQL SQL. The old-main negative control also reproduces the parser rejection. #28998 stays open with ck89119 for the release gap. Full branch evidence, commands and qualification limits: #28998 (comment) The private Gitea deployment, old-binary rolling upgrade, GPU and full C01-C12 compatibility release scope were not executed/certified; no author report or CI status substitutes for these local results. |
|
本轮合并功能审计复测(2026-10-19 UTC,main 相关仍开放问题均在 CN0/CN1 复现:
实际命令(目标测试整体 exit 1,8 个 CN/问题断言均失败): 原始日志: |
What type of PR is this?
Which issue(s) this PR fixes:
Related to #28998, including all C03 acceptance transferred from duplicate #29482. Parser acceptance or issue consolidation is not treated as completion.
What this PR does / why we need it:
Current follow-up: main merge and execution-ID collision (2026-10-17)
Delivery head: a27d30c. Normal two-parent merge of task-start official main a322466 into the original branch. Preserve main's CHECK_ASYNC_DATALINK_SOURCE599 and move only unpublished C03 to INTERNAL_TABLE_COLLATION600 / END601. Protocol118, migration4.0.15/min4.0.14/offset4 and PB defaults18 stay unchanged.
Current Go1.27.1/Darwin/arm64/native evidence, complete terminal PASS/exit0 and unchanged frozen inputs:
run.sh -g -n, no genrs: [SUMMARY] COST : 58s, TOTAL :3022, SUCCESS : 3021, FAILED :0, IGNORED :1, ABNORAML :0, SUCCESS RATE : 100% ; [SUMMARY] COST : 51s, TOTAL :3022, SUCCESS : 3021, FAILED :0, IGNORED :1, ABNORAML :0, SUCCESS RATE : 100%. All54 source/mirror pairs agree; errors empty, both fixture and DB/account/snapshot closures0, admission released, owned kernel exited. Existing C03 oracle cells stay unchanged this round; upstream SQL/oracle changes are preserved, not weakened locally. Binary/native/driver hashes and toolchain build info retained. Keep2819 service ERROR lines; no panic/fatal/data-race signatures, not zero-error execution.All167 PR paths and25 new/upstream-interaction paths are mapped;371-path full-merge allowlisting is checked against the actual current index rather than copying the previous count. Generated parser reproducibility, source/index/commit tree/parents and original remote head are verified. Private TODOs/drivers/profiles/logs/caches remain uncommitted; only the two existing DESIGN/VALIDATION documents are delivered.
Later observed official main 38a27e6 passes read-only merge-tree; runtime qualification stays pinned to a322, not any later unmerged changes. Existing macOS full-optools limitations remain. No Linux CI/external approval, GPU/whole-repository or old-binary rolling-upgrade qualification is claimed. No re-review request, comment, issue closure or continuous remote CI monitoring.
Previous follow-up: partially dependent replay and main117 compatibility (2026-10-16)
Delivery head: cabf624. Normal two-parent merge of task-start official main b3d6b21 into the original branch. Preserve main117 collation-aware LEAST/GREATEST overload4 independently; unpublished C03 advances to 118, while function599/END600, migration4.0.15/min4.0.14/offset4 and PB defaults18 remain unchanged. Protocol117 and mixed118/117 test fixtures reject C03 before writes; existing predecessor and independent117 positives remain intact.
Address review5545002038's P1:
concat(v,a/b)must not re-author the unaffected division when v changes domain under a different current precision. The original actual-SQL RED has three affected failures and five passing controls. Retain typed unaffected children, authored CAST/EXPLICIT COLLATE, numeric/assignment boundaries and source immutability; refresh only affected character operations and compiler string coercions in the existing replay owner. Restore visible/catalog coordinates rather than replacing adapted expressions with raw sources. Binding errors fail closed; ordinary authored MODIFY and physical type changes keep their current-binding path. No global/session workaround, index-admission relaxation, new cache/worker or cleanup owner.Native/general/bin round trips also retain the original arithmetic and bound metadata across12 conversions. Compiler scalar-to-text coercions use NUMERIC provenance without modifying the numeric subtree; only equal-physical-width/pad implicit layers collapse. Explicit COLLATE's CAST0/rank0 remains authored. Two actual-SQL COLLATE controls passed and are not mislabeled public REDs; the closest typed-owner/CAST0 preservation assertions supplied the retained RED. Public regressions require both new implicit native comparison and unchanged explicit binary comparison.
Current Go1.27.1/Darwin/arm64/native qualification, with complete successful terminal events and unchanged frozen inputs:
run.sh -g -ncomparison, no oracle generation: [SUMMARY] COST : 60s, TOTAL :3022, SUCCESS : 3021, FAILED :0, IGNORED :1, ABNORAML :0, SUCCESS RATE : 100%; [SUMMARY] COST : 74s, TOTAL :3022, SUCCESS : 3021, FAILED :0, IGNORED :1, ABNORAML :0, SUCCESS RATE : 100%. All54 source/mirror hashes agree, errors empty, both fixture and DB/account/snapshot closures0, admission released and owned service exited. New public cells are manually authored additions; previously approved existing oracle cell is unchanged this round. Binary/native/test-driver hashes and toolchain build info are retained. Retain2831 service ERROR lines with no panic/fatal/data-race signatures; not zero-error execution.Parser owner regeneration is reproducible twice, identical to the merged candidate. Plan/pipeline schema/carriers/generator inputs are byte-identical between main76 and frozen mainb3; for each respective file the candidate equals delivered05. Only that exact-input generation/descriptor proof is reused, while PB execution is fresh. Preserve prior DEFAULT/V1-native-UNIQUE, transaction/identity, index, recovery and strict COPY controls.
All fixture/compile/assertion/resource non-passes remain separate. The first owner scheduling attempt was stopped only after its running child ended naturally, then final owners were rerun from frozen inputs; no unrelated process was terminated. All private TODOs/drivers/profiles/logs/caches remain uncommitted; only the existing DESIGN/VALIDATION documents are delivered.
Later official main 2cf7684 still owns only117 and passes the read-only merge-tree check. Qualification stays pinned to b3, not its unmerged new binder/catalog-validation changes. Historical Darwin full-optools limitations remain. No new-head Linux CI, external approval, whole-repository/GPU or old-binary rolling-upgrade qualification is claimed. No issue closure, re-review request, comment or continuous CI monitoring is performed.
Previous follow-up: CI and main compatibility (2026-10-16)
Delivery head: 05d97d3. Normal two-parent merge of official main 76deafc into the original branch; no rebase or force-push. Preserve upstream native Unicode ordinary-table UNIQUE114, calendar115/function598 and division-warning116; unpublished C03 is 117/function599/END600, with migration4.0.15 and PB defaults18 unchanged.
Final Go1.27.1/Darwin/arm64/native evidence, with unchanged frozen Go/proto/module inputs:
run.sh -g -ncomparison: each 2998 total/2997 success/0 failed/1 existing ignore/0 abnormal, Java50s/53s, driver156.36s PASS. Source/mirror54 hashes agree; both fixture and DB/account/snapshot closures0, empty errors, admission released and owned kernel exited. Retain2793 service ERROR lines, no panic/fatal/data-race signatures; not zero-error execution.The first public run had exactly one stale expected CONVERT rejection message from upstream native114. With explicit user approval, synchronize only that existing result cell to the unchanged upstream helper's message; no SQL/data/error-code/rejection/skip/budget changes and no oracle generation. Retain that failure and the local cache-induced explain build failure separately, neither counted as a pass. Final source/index, allowlist, descriptors, formatting and whitespace checks pass; private TODOs/drivers/cache/logs/profiles stay uncommitted.
Observed official main b24d1b3 adds an unrelated18-file window change; read-only merge-tree succeeds, but qualification remains pinned to76deaf, not that unmerged code. Historical macOS full-optools failure remains disclosed. New-head Linux CI and external approval are not claimed. No issue closure, review request, comment or continuous CI monitoring is performed.
Previous follow-up: protocol114 expression and persisted-view compatibility
Delivery head: 0f0c038. Normal merge of task-start official main bb2b725, preserving the original branch/ready PR.
Fix inline 4280094988: detect execution identity 598, independent of its display name, in the shared expression feature walk and require114 through persisted-view authoring/loading, worker placement, send-destination and receive-before-allocation gates. Preserve existing596/597 and main113 semantics. Direct/prepared authors reject113 without catalog publication, allow114 and persist the minimum-version marker; marked/unmarked readers enforce the floor and ordinary legacy views remain valid.
The real SQL regression exposed a fresh-bootstrap dependency: the protected TABLES consumer was being authored before admission at floor0. Install the legacy prerequisite definition, then atomically publish TABLES114 with the four existing trace completion views after admission114 and before ingress. Complete existing clusters retain their skip path. Reuse existing transaction/rollback/retry/cleanup owners; no bypass, new worker/cache or timeout increase. A real successful DROP followed by rejected CREATE preserves the original TABLES relation ID after rollback;114 reconciliation succeeds.
Current Go1.27.1/Darwin/native evidence:
run.sh -g -ncomparison: each 2998 total/2997 success/0 failed/1 original ignore/0 abnormal, Java49s/51s, driver153.33s PASS. No oracle generation;54 source/54 mirror hashes match, errors empty, both fixture and mapped DB/account/snapshot closures0. Preserve2791 service ERROR lines, no panic/fatal/data-race signatures; owned service exited.Retain non-passes honestly: initial bootstrap floor0 failure; interrupted CN run using the old98 positive fixture, corrected to114 and exact five CREATEs before a fresh full-owner pass; initial SQL command selected only the old default column-limit test and is not full-suite evidence. The explicitly unfiltered46-test run above is the full-suite qualification. Previous macOS full-optools failure remains a limitation, not relabeled green.
Validation is pinned to bb2. Official main advanced to 461bc8e during validation; its unrelated24-file change was not chased into this focused follow-up. The final staged tree has no text conflicts with that observed main; this does not claim validation of461 code. Historical evidence retains its original source/mode scope. New-head Linux CI and external approval remain unconfirmed. No re-review is requested for this follow-up, as instructed. Private TODOs/drivers/logs/profiles remain uncommitted.
Previous follow-up: parser merge f53bbf1
Delivery head: f53bbf1. Normal merge of 501c85e. The two new inline findings in review5527576615 assess old f5a7: their generated-expression preservation and unsupported-main113 admission issues were already fixed in170a. Verified those owners and controls remain intact; C03 stays114, migration4.0.15, PB18 and function598.
The only conflict was generated mysql_sql.go. Regenerate twice from the merged grammar through its owner with identical hashes, not a hand edit. Preserve main's POINT alias, CHAR CHARACTER SET expression semantics, suffix USING/index options and audited UT scope changes. No new C03 product state, locks, protocol or persistence format.
Current Go1.27.1/Darwin/native validation:
Earlier race/multi-CN/restart/upgrade qualifications retain their original input scope; this merge adds no C03 concurrency/persistence change and does not relabel them as reruns. Private evidence stays uncommitted. That earlier delivery resolved two addressed threads and requested re-review; this is historical, not a review request for the current follow-up.
Previous review follow-up: 170a5d1
Delivery head: 170a5d1. Normal merge of 17a6200, preserving main's DECIMAL statistics113 contract and moving only unpublished C03 to114. Migration4.0.15/min4.0.14/offset4, PB18 and function598 remain unchanged. Reject predecessor113 and mixed114/113 before writes; preserve all original109–112 controls. Pipeline/parser owner regeneration is reproducible; complete descriptors retain upstream contracts.
Address review 5523469825: changing division precision must not reauthor an unaffected persisted generated expression during CONVERT. The pre-fix owner overlay reproduces
0.333333333333→0.33, with unchanged-session/ordinary-COPY controls passing. Conversion-local typed replay retains proven-safe computation and authored CAST, adapts destination assignment, remaps positions once and bounds repeated string conversions. Ordinary MODIFY, affected-input binding, transaction/COPY/index/constraint/cleanup owners remain intact. New SQL-entry regressions check existing and future rows; typed controls include legacy/native domains, defaults/on-update, source immutability and eight alternating conversions.Current local Go1.27.1/Darwin/native qualification:
run.sh -g -n: each 2871 total/2870 success/0 failed/1 original ignore/0 abnormal, Java54s/49s, driver155.41s PASS. Generate only the new result; independently verify ten exact numeric rows and destination metadata. Existing23 oracles are not regenerated; final48 source/48 mirror hashes agree, reports/errors and both cleanup closures verified.Retained non-passes: initial source-edit/vet race, pre-bounded prototype GREEN/profile, parse-invalid ON UPDATE candidate, and three multicn runs with stale expected113/actual114. Correct the test-only RPC restore/message literals to114 and add predecessor113 rejection, then rerun the entire multicn package three times. No product retry/skip/timeout increase or oracle weakening. Resource admission failures and guarded archive-only recovery remain separate; source/WIP/modules/databases/native/evidence/worktrees and unrelated processes preserved. Private evidence stays uncommitted. New-head Linux CI and external re-review are not yet claimed green.
Previous maintenance: frozen fcad62a
Normal merge of fcad62a, retaining the original ready PR,
2b0422bafand all prior delivery history. Keep main's calendar112 contract and move only unpublished C03 gates/fixtures to113, including 109–112 rejection and 113/112 mixed-upgrade rejection. Normally regenerate PB/parser; final parser forced generation is reproducible. Complete decompressed descriptor comparison against main allows only approved DatabaseDefaults and fields5/3/18; upstream RankOption.nprobe2 and all other contracts remain intact. No hand-edited generated code or whole-file ours/theirs resolution.CI 38421272142, coverage job 115379184105, genuinely failed TestUnicodeCollationConsumerContract: SHOW FULL COLUMNS returned a non-NULL collation for binary types. Keep that original assertion unchanged and separate SHOW's NULL from information_schema's binary metadata using a pure projection helper. Correct only three corresponding C03 SHOW result cells; preserve SQL/data, character/native/generated controls and information_schema binary assertions. No golden regeneration, product retry/skip or gate exemption.
Ordinary UT job 115379110169 was cancelled. Its complete diagnostic JSON has no failed/pending events; the last package terminal is pkg/tests/issues PASS at16:56:22. Cancellation cause remains unconfirmed, not claimed fixed. Historical TLS checkout failures and absent-producer/no-coverage-verdict runs remain separately documented. This ordinary push triggers normal new CI; remote Linux green is not claimed.
Previous local validation: frozen fcad62a
Go 1.27.1, Darwin/arm64, repository CGo/native linkage and enabled vet, frozenfcad:
run.sh -g -n: each 2809 total /2808 success /1 original ignore /0 failed /0 abnormal, Java54s/58s, TestCIMoTester164.07s PASS, exit0. Original18 plus rank options, external NULLIF rebind,4096-column boundary,subscription identifier and procedure index consumers.Retained local failures: parser make timestamp noop/build failure, old112 migration fixtures, first lint package-loading timeout, pre-BVT disk admission rejection and first public round 2809/2807/1 failed/1 original ignore from a remaining raw-binary SHOW oracle. They are not counted as passes. Corrected that third NULL cell and completed fresh full same-instance double-run closure; no SQL/data/timeout/ignore changes. Only the failed local lint's verified orphan compiler was terminated; unrelated tasks were untouched.
Preserve 20,000,000-row PK COPY /120000ms socketTimeout /ddl_accounting_ok=1 /original wait controls. Earlier20M, full/race/restart/upgrade and frozen8586 evidence remains historical, not relabeled as current reruns. Guarded regenerable Go-cache cleanup preserves source/WIP/databases/module caches/native artifacts/evidence/worktrees and unrelated processes. 16GiB reserve / >17GiB admission unchanged; APFS logical bytes are not summed as physical recovery.
Approved design:
CLAUDE_DESIGN_28998_C03.md.Qualification record and historical acceptance:
CLAUDE_VALIDATION_28998_C03.md.Normal merge/ordinary push to the original ready/non-draft PR; no rebase, force-push or replacement PR. Private TODOs, drivers, caches, profiles, reports, mirrors and review ledgers excluded. Local Darwin/embed success and MERGEABLE do not prove remote Linux CI green.