Skip to content

fix: reject incomplete exponents and keep owned daemon controls available - #31137

Merged
mergify[bot] merged 3 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/loom/develop/769cdbea33f9fee64fc42bec4c8adf8a0b2bd604ec4275d0212909856f42be21
Nov 3, 2026
Merged

mergify[bot] merged 3 commits into
matrixorigin:mainfrom
iamlinjunhong:codex/loom/develop/769cdbea33f9fee64fc42bec4c8adf8a0b2bd604ec4275d0212909856f42be21

Conversation

@iamlinjunhong

@iamlinjunhong iamlinjunhong commented Oct 25, 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:

What this PR does / why we need it:

SELECT 1.5e and SELECT 1.e silently returned the mantissa with alias e. The MySQL scanner now rejects an invalid exponent immediately after a dotted mantissa, producing syntax error 1064/42000 near the original literal. Valid exponents, digit-leading identifiers such as 1e, and valid adjacent or separated aliases retain their behavior.

The correction consumes only the invalid exponent introducer and uses the existing lexer error path. It adds no scanning, allocation or state to valid literal handling. Regression coverage checks token boundaries, public parser errors and typed ASTs, incremental parsing, parser reuse, and SQL values/column metadata.

Original-head validation (1bcd685fd6fa907264d5adcab1417c5e31b307d2) on macOS arm64 with Go 1.27.1:

  • Focused regressions and complete MySQL/parser packages passed through the repository CGo test wrapper; incremental gofmt, vet and configured lint passed.
  • Current-source CPU service build passed. Sixty real-client MatrixOne/MySQL 8.0.46 checks passed, including syntax error codes, original invalid text, values/headers, identifier controls and PREPARE inner SQL.
  • dtype/numeric_literal_exponent.test passed twice on the same isolated service: 11/11 each, full column metadata enabled, zero failed/ignored/abnormal cases; teardown confirmed between runs.

CI refresh on 2026-11-01: rebased the unchanged patch onto official main e90e05b3a4d959797f276c45dbece14f0f4fdb87, producing commit 6348a40cc461f66acb604f19740f17995443a8a6. git range-diff confirms the patch is identical after rebase.

Validation on the rebased commit (macOS arm64, Go 1.27.1):

  • .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=120s -p=2 -json ./pkg/sql/parsers ./pkg/sql/parsers/dialect/mysql passed both complete packages, including all three exponent regression roots.
  • gofmt, go vet -mod=readonly and configured incremental golangci-lint for both packages passed (0 lint issues); delivery artifact check passed.
  • The real-client and BVT results above are historical evidence from the original head and were not rerun after this rebase. New remote CI is pending.

The previous coverage run failed in the shell fixture TestEmbeddedPrebuiltPublicationCancellationLatch/test_pids with PUBLICATION_CANCELLED 90; Coverage merge and CI Required were downstream failures. The corresponding tracking issue is closed. This refresh follows the authorized current-main CI workflow and does not claim that independent fixture defect is fixed.

CI also exposed a pre-existing daemon-control admission problem: fresh HAKeeper placement discovery could reject pause/cancel work already owned by the local runner. Locally owned PauseRequested, Paused finalization and CancelRequested tasks now bypass that placement check. Starting/resuming/restarting or taking over foreign-owned tasks still requires admission; durable handler ownership and generation fences are unchanged. This control-path correction is independent of numeric-exponent parsing, and does not claim to fix the underlying HAKeeper availability failure.

Linux/amd64 Go 1.27.1 validation with rebuilt native dependencies:

  • A deterministic admission-denied regression fails on the previous taskservice code and passes with the correction. It checks local/foreign/unassigned owners, all stopping/runnable states, duplicate selection, actual pause/cancel routine calls and durable terminal states.
  • Full taskservice normal and race suites pass with -short -tags matrixone_test. The two new tests and paused CDC finalization retry test each pass 100 focused race repetitions; the finalization test now covers local ownership while placement admission is denied.
  • The exact TestCDCTargetGenerationContractsOnMO SQL suite passes under race. Formatting, scoped vet and incremental golangci-lint pass. Independent Astra medium design/final review has no unresolved blocker.

New-head hosted CI remains pending. Please have the reporter verify #31057 after merge.

@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 →

@mergify mergify Bot added the kind/bug Something isn't working label Oct 25, 2026
@matrix-meow matrix-meow added the size/M Denotes a PR that changes [100,499] lines label Oct 25, 2026
@iamlinjunhong
iamlinjunhong force-pushed the codex/loom/develop/769cdbea33f9fee64fc42bec4c8adf8a0b2bd604ec4275d0212909856f42be21 branch from 1bcd685 to 94b4fc1 Compare October 31, 2026 15:48
@iamlinjunhong
iamlinjunhong force-pushed the codex/loom/develop/769cdbea33f9fee64fc42bec4c8adf8a0b2bd604ec4275d0212909856f42be21 branch from 94b4fc1 to 6348a40 Compare November 1, 2026 04:23
@XuPeng-SH

XuPeng-SH commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

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

Commit: 366707af65e9b7e97ba6474c58e113e009c63237

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: 366707af65e9b7e97ba6474c58e113e009c63237

Assessment: approve

Both fixes are appropriately scoped: malformed dotted exponents use the existing lexer-error path, and locally owned stopping tasks bypass placement admission while runnable and foreign-owned tasks remain gated. No actionable findings.

Model: gpt-6-astra / xhigh

Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2

Validation:

  • Reviewed the complete delta, affected consumers, lifecycle guards, regression oracles and supplied discussion.

  • Reused frozen-head successful UT, coverage, SCA, shared-build and proxy/pessimistic multi-CN BVT results.

  • Confirmed parser/BVT files match the author-tested rebased revision.

  • Source and evidence audit passed: checks/1793545543920053353-5.json; logs retained and source unchanged.

Limitations:

  • No local Go or BVT rerun; detailed execution logs were not supplied. Focused race repetitions remain author-reported.

  • The original parser revision was unavailable locally, so its historical live-validation results were not independently matched.

@mergify

mergify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

queue

🛑 Pull request from fork cannot be queued

Details

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.

@iamlinjunhong

Copy link
Copy Markdown
Contributor Author

@Mergifyio refresh

@mergify

mergify Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

refresh

✅ Pull request refreshed

@mergify

mergify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🛑 Queue command cancelled

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

mergify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into main as 6eb6191 at 04:02 UTC

1 h 4 min in the queue, 1 h 3 min of it CI.

So far

  • ✅ Entered the queue Tue 3 Nov, 02:58 · rule main · triggered by a @mergifyio queue command
  • ✅ Passed · in place
  • ✅ Merged 04:02 · 6eb6191 · squash
3 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = CI Required
    • check-neutral = CI Required
    • check-skipped = CI Required

Times in UTC · dashboard · how the merge queue works

This branch was previously deployed

1 inactive deployment
ci — 953d8bff Deployed Nov 3, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants