Repository navigation
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Reviewed latest head Recommendation: request changes — one reproducible P2 finding. [P2] Apply the native COLLATE clause before admitting SET NAMESLocation: The new admission path accepts Reproduced through a real embedded CN/MySQL connection for both protocol IDs 192 and 224: SET collation_connection = 'utf8mb4_bin';
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci; -- succeeds
SELECT @@collation_connection; -- utf8mb4_bin, not utf8mb4_unicode_ci
Validation: focused CI note (separate from the finding): SCA and UT Coverage both report |
|
已更新 PR #30093,当前 head 为
新的 Coverage/UT/SCA 检查已触发,等待结果。 |
|
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: 774759c0c114a56ff862667f74848b5f448ffff9
Assessment: request_changes
Reviewed the complete five-file delta and supplied review history. Registry and setter reuse is appropriate, and earlier findings are fixed. One configured-default path still publishes an incompatible charset/collation pair.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
- P2
pkg/frontend/mysql_cmd_executor.go:1620: With character_set_server=utf8mb4, execute SET GLOBAL collation_server='utf8_unicode_ci'; SET NAMES DEFAULT;
Impact: Both statements succeed, leaving all three session charsets as utf8mb4 but collation_connection as utf8_unicode_ci, which belongs to utf8. DEFAULT resolves the two global values independently and validates only the collation name. Resolve and validate the effective pair before publishing session state, or maintain consistent server defaults through their setter owner.
Evidence: Production parser/executor probe TestReviewSetNamesConfiguredDefaults reproduced the incompatible tuple; the utf8mb4_unicode_ci control passed. The merge-base production overlay rejects the first statement, confirming this native sequence is newly admitted. See boundary-probes.log and receipt 1792074659558233751-3.json; base-control.log and receipt 1792074781716260540-3.json.
Validation:
-
Artifacts retained under /home/xupeng/.local/state/mo-bot/jobs/2c9aabcf08601967be65ceb4/attempt-1. Isolation preflight passed; 192 native inputs and 52 artifact hashes were verified before testing.
-
Ten focused frontend/collation root tests passed using test-exec, including handshake, COM_CHANGE_USER, explicit/default/implicit SET NAMES and identity/revision checks. Receipt: 1792074379844613029-3.json.
-
Candidate failure and base rejection control were reconciled with commands, overlays, source fingerprints and terminal logs in validation-summary.json. Final evidence audit passed, receipt 1792074896059705138-3.json; source remained unchanged.
-
Exact-head CI success metadata was inspected. Performance review found bounded registry/session work without added row-level SELECT/DML/DDL work; no throughput measurement was claimed.
Limitations:
-
The reproduction uses production parsing, execution and setters with catalog persistence stubbed; no fresh live-client/server or full local package/race run was performed.
-
CI and earlier live-client evidence supplied statuses/comments rather than raw logs. The linked issue #30014 body was absent from frozen evidence.
-
An additional probe confirmed the unchanged default_collation_for_utf8mb4 enum restriction; it is not classified as a newly introduced regression.
|
Updated PR #30093 at head
Latest main ( New Required CI runs are queued for this head. |
|
Follow-up head Focused |
|
Post-sync validation on head |
|
The post-sync Iceberg adapter tidy job ( |
|
The rerun of Iceberg adapter tidy for head |
|
Re-reviewed head Recommendation: approve from the code-review perspective for the connection-admission / SET-state scope of #30014, subject to required CI completing successfully. No new PR-specific blocking finding. The incompatible-server-default P2 reported on The effective DEFAULT charset/collation pair is now checked before publishing any session values. With Independent validation:
Scope/validation caveats, not additional merge blockers for this narrow issue:
At recheck, shared build, Connector/J Pool Reset E2E, and adapter tidy had passed; required UT/SCA/coverage/BVT were still queued/running. No production files were changed or pushed. Ordinary comment only; no formal approval or dismissal of earlier reviews. |
|
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: 61909b41aaf8b57824fa0a6715440bbb661bcfb5
Assessment: approve
Reviewed the complete five-file delta, callers and supplied review history. Registry and session-setter ownership is appropriate. Native admission preserves legacy aliases, and SET NAMES now validates defaults before publishing consistent session state. Earlier findings are resolved; no actionable PR-specific defect remains.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
Validation:
-
Isolation preflight passed. Verified 192 native input files, including the compatible Makefile native section, and 62 artifact hashes; the current repository build target completed successfully.
-
Fourteen focused frontend/collation test roots passed, covering identity/revision, handshake, COM_CHANGE_USER, explicit/default/implicit SET NAMES and rejection paths. Receipt: 1792086652436843802-4.json.
-
Eighteen live-protocol subtests passed: eight admitted handshakes with prepared queries, three rejected handshakes, ordinary/prepared SET NAMES across three connection configurations, and configured-default rejection/recovery with prepared-statement reuse. Receipt: 1792086692212381207-3.json.
-
Reconciled commands, clean-head fingerprints, exit receipts, logs and overlay hashes in /home/xupeng/.local/state/mo-bot/jobs/aa545c6dd5d11a1b73cfbc30/attempt-1/validation-audit.json. Diff check passed; source remained unchanged.
-
Frozen evidence reports successful exact-head build, UT, SCA, coverage, BVT and Connector/J checks. Performance tracing found bounded connection/SET work without added per-row SELECT/DML processing.
Limitations:
-
Live validation used Go's MySQL driver; no fresh mysql2, full race, mixed-version migration or performance benchmark was run.
-
CI evidence contains statuses rather than raw logs; earlier comment-only executions were not counted as local validation. The linked issue body was absent.
-
Approval covers connection admission and SET state. Broader collation semantics are not claimed verified. The unchanged default_collation_for_utf8mb4 enum still rejects native Unicode values despite the broader PR-description wording.
aunjgr
left a comment
There was a problem hiding this comment.
Reviewed the complete five-file change at 61909b4. No blocking findings.
The handshake and COM_CHANGE_USER lookup admit only implemented UCA400 domains while retaining legacy identities and rejecting the other native IDs. SET NAMES now updates the connection collation with the charset variables, resolves implicit/default collations before publication, and rejects incompatible explicit/server-default pairs without mutating user variables. I checked the registry, variable-type restrictions, protocol callers and success/rejection/reset tests. This is a focused correction to existing collation admission, not a new storage or comparison design.
Reused the current-head passing CI (UT, SCA, coverage and BVT) and the targeted protocol/session regression evidence; no additional local cluster or performance run was needed for this bounded admission change.
aptend
left a comment
There was a problem hiding this comment.
Deep re-review of exact head 61909b4; base/merge-base 6d27391. Read the complete five-file diff, all nine formal reviews, all 32 conversation/author comments, all three inline comments and both unresolved/outdated threads. Compared my previous 1293d67 review with the current admission/SET-state closure.
No remaining PR-specific blocker in the connection-admission / SET-state scope of #30014. All previously reported postconditions are now closed: session-system rather than user-variable writes, all four SET NAMES settings, explicit/default/implicit collation resolution, both replayability tracking owners, and rejection of incompatible configured server defaults before publishing any session value. Native IDs/revision remain distinct, legacy aliases remain compatible, unsupported domains remain closed. Old unresolved UI threads do not imply that their old code defect still exists.
Independent exact-head validation:
- Fresh make -j4 cgo completed successfully; CGO-enabled full common/collation and frontend packages with -count=1 -vet=all PASS: 19 roots / 0.199s and 2459 roots / 23.548s.
- Actual mysql2 3.24.5, Node v22.22.0, against an owned one-CN MySQL service: admission/SET-state probe PASS, package and teardown 5.664s. Three confirmed outgoing handshake IDs (driver default224, explicit192, legacy45) and real binary prepared SELECT; two rounds per physical connection of COM_QUERY and real COM_STMT_EXECUTE.
- All 60 explicit/default/implicit SET NAMES complete-state checks pass, preserving three colliding user variables; all 24 cross-charset rejection/state-preservation controls pass. Four real configured-default rejection/recovery checks pass, including reuse of the prepared DEFAULT statement after global-default repair. Test-owned globals are restored and sockets/service/port leases closed.
- Probe JS SHA256 3de9f819e514361ecd1fc1f569ad7b5e86bfb1a94c36aa07d1e917c83f5e49ba; harness SHA256 7d7aa211377b22109124bd18c288c062e665c4435065ea630414c7a8c9897a30.
- Exact-head ALL CI 38760299088, Connector/J and Iceberg runs completed successfully. Verified checkout SHA and successful terminal checkpoints in the raw Ubuntu UT log; skipped lanes are not passes.
Important calibration: the initial extended mysql2 probe was NOT green. COM_CHANGE_USER followed by a prepared SELECT failed with "prepared statement '__mo_stmt_id_1' does not exist". I isolated an identical legacy-ID45-only test and ran the SAME source/command at both head and the clean exact merge-base, with independently built native prerequisites: the same semantic failure occurs on both (base package/cleanup 5.600s). The common reset/routine/protocol implementation is unchanged by this PR. This establishes a pre-existing prepared/reset limitation, not successful end-to-end prepared execution after COM_CHANGE_USER and not a new collation-specific blocker. The passing probe explicitly selects admission/SET-state scope; COM_CHANGE_USER packet admission is separately covered by the full frontend suite. Matched harness SHA256 88cfb6d75fe5d5bc5b0a2d9052ec4b735ae50e28636cdeddc30e80fd73ae6b88; legacy driver probe SHA256 9299fc56b746ea4a2cfee54b7e510b824e12accddf30f34a6e9177748e01f264. No failure was reclassified from a successful rerun alone.
Scope limits: Node version differs from the issue's v24.19.0. Broader collation-comparison semantics are explicitly outside this issue and are not claimed fixed; the unchanged default_collation_for_utf8mb4 enum still excludes native Unicode assignments despite the broader PR-body wording. No live mixed-version migration, new race or throughput claim.
This is an ordinary bounded admission/state repair, not a new collation/storage architecture. Immutable registry lookups and existing session setter/lock/reset owners are reused; no new asynchronous wait, retained resource or unbounded per-row work is introduced. No production changes or pushes. Approval applies only to the exact SHA above.
LeftHandCold
left a comment
There was a problem hiding this comment.
Reviewed exact head 61909b4 against base/merge-base 6d27391. No new blocking finding; approve for the connection-admission and SET-state scope of issue #30014.
Scope/design:
- Read every hunk of the five-file change, the issue, review history and both inline threads. Followed the registry, parser, handshake/COM_CHANGE_USER callers, system-variable definitions/setters, and migration replayability/snapshot consumers. The detached worktree is clean; the primary user worktree was not modified.
- Registry admission is the appropriate existing owner: legacy aliases retain revision-zero behavior; native UCA400 identities use revision one; unsupported native families remain rejected. This is a bounded existing-contract correction, not a feature requiring a separate framework or design document.
- SET NAMES resolves explicit, implicit and configured-default collations before publication. Explicit/default charset mismatch rejection precedes mutation; all four writes use session-system scope and preserve same-named user variables. The implicit utf8mb4 default remains constrained by the existing enum. The four relevant system variables have string converters and no new fallible runtime update hook after validation.
- Both replayability capture and marking include collation_connection. Prepared assignments retain the existing conservative migration behavior; typed snapshots continue to use the existing system-variable owner. No new wire/catalog format or parallel state machine is introduced.
Prior findings are closed in the current source and committed regressions: missing explicit COLLATE application; wrong user/system namespace; DEFAULT boolean conversion; missing DEFAULT collation reset; missing literal/implicit collation reset; incompatible configured charset/collation defaults. The two aptend inline threads are still marked unresolved in GitHub, but their reported code paths are corrected; I have not resolved another reviewer's threads or dismissed their reviews.
| Audit | Result |
|---|---|
| Q1 ownership | Reuses immutable registry values and session-owned variables/replayability state; no new external resource, worker or cleanup owner. |
| Q2 waits | Existing short registry/session-map operations and locks; no new I/O, retry loop, cross-owner wait or lock ordering. Invalid pairs reject before session writes. |
| Q3 growth/performance | Fixed-size registry scans and four variable updates per SET NAMES; bounded session keys. No added per-row SELECT/DML work, cache or accumulating registry. |
Evidence:
- Local gofmt checks on all five changed Go files and git diff --check passed. No local service, heavy compilation or redundant full-suite run was started.
- Verified ALL CI run 38760299088 is completed/success for this exact head. Required CI, Ubuntu UT/coverage, SCA, shared build, pessimistic multi-CN BVT, proxy BVT and Connector/J checks are successful. Darwin/upgrade and other skipped jobs are not counted as passing coverage.
- Reused the exact-head author/reviewer records of focused/full-package and live-protocol admission/SET-state validation, including prepared execution and rejection-state preservation. These are existing reported runs, not independently rerun local evidence. No new mysql2, mixed-version live migration, race or throughput claim is made here.
Non-blocking scope clarification already raised in the discussion remains valid: default_collation_for_utf8mb4 still has the unchanged two-value enum, so SET default_collation_for_utf8mb4='utf8mb4_unicode_ci' is not enabled end-to-end by this PR. Please narrow that PR-description bullet. Approval does not claim that broader Unicode comparison semantics or handshake-to-session-sysvar synchronization have been completed.
|
@mergify refresh |
✅ Pull request refreshed |
Merge Queue Status
This pull request spent 30 minutes 5 seconds in the queue, with no time running CI. ReasonPull request #30093 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.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
|
最近24小时合并项复核:main |
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #30014
What this PR does / why we need it:
MatrixOne advertises
utf8_unicode_ci(protocol ID 192) andutf8mb4_unicode_ci(protocol ID 224) as compiled collations, but the frontend handshake andCOM_CHANGE_USERadmission path rejected both because they have no legacy identity. This causes clients such as mysql2, whose default collation is protocol ID 224, to lose the connection before the first query.This change:
collation_connection,default_collation_for_utf8mb4, andSET NAMES ... COLLATE ...validation without collapsing their charset identity;Validation:
make cgo -j4.agents/skills/mo-dev/scripts/mo-cgo-test -v -count=1 -timeout=180s -run '^TestCharsetAdmission' ./pkg/frontend.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=600s ./pkg/frontendGOWORK=off go test -v -count=1 -timeout=180s ./pkg/common/collationgo vet -mod=readonly ./pkg/common/collation ./pkg/frontend(with repository CGo include/library paths)The locally installed golangci-lint is v1.52.2 and cannot parse this repository's v2 configuration; this is an environment/tool-version limitation, not a code finding.