Skip to content

fix:add server_id system variable for odbc - #23578

Merged
mergify[bot] merged 4 commits into
matrixorigin:mainfrom
robll-v1:fix-variable
Jan 27, 2026
Merged

mergify[bot] merged 4 commits into
matrixorigin:mainfrom
robll-v1:fix-variable

Conversation

@robll-v1

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:

issue #11171

What this PR does / why we need it:

Adds the missing server_id system variable to MatrixOne so ODBC clients can read @@server_id during connection initialization without error. Also adds regression coverage in the distributed system variable tests. This prevents Tableau/ODBC connections from failing with “system variable does not exist.”

@robll-v1
robll-v1 requested a review from XuPeng-SH as a code owner January 22, 2026 08:21
@robll-v1
robll-v1 requested a review from a user January 22, 2026 08:21
@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.

@mergify mergify Bot added the queued label Jan 27, 2026
@mergify

mergify Bot commented Jan 27, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

✅ The pull request has been merged at 0ef232b

This pull request spent 1 hour 43 minutes 45 seconds in the queue, including 54 minutes 28 seconds running CI.
The checks were run in-place.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-neutral = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Ubuntu/x86
    • check-neutral = Matrixone CI / SCA Test on Ubuntu/x86
    • check-skipped = Matrixone CI / SCA Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-neutral = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-skipped = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-success = Matrixone Utils CI / Coverage

@mergify
mergify Bot merged commit 62909f2 into matrixorigin:main Jan 27, 2026
@mergify mergify Bot removed the queued label Jan 27, 2026
ghost pushed a commit that referenced this pull request Apr 29, 2026
#24191)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

fixes  #24186

## What this PR does / why we need it:

Backports the prepared-statement / connector compatibility fixes from
`main` to `3.0-dev` listed in #24186:

| PR | Title |
|----|-------|
| #23413 | Fix BOOL MySQL protocol output and refresh BVT results |
| #23578 | Add `server_id` system variable for ODBC |
| #23864 | Reset vector class to FLAT in `ResetWithSameType` to fix
prepared stmt null json panic |
| #23887 | Fix NULL on duplicate key for unsigned columns *(already on
3.0-dev — skipped as empty)* |
| #23982 | Support JSON prepared params |
| #23984 | Clear prepared binary param state |
| #23980 | Harden prepare long data parsing |

#### Additional changes required to make the cherry-picks compile and
pass tests on 3.0-dev:

- Pulled in the prerequisite **#23978** *"harden prepared binary reset
cleanup"* (the COM_STMT_EXECUTE error path now returns the prepareStmt
so `clearBinaryParamState` runs; `doReset` now clears binary state;
COM_STMT_RESET / COM_STMT_CLOSE error paths return early instead of
dereferencing a nil prepareStmt; `parseStmtExecute` returns `preStmt` on
error).
- Added a missing `MultiUpdateCtx.clone()` helper (with `PartitionCols`
initialization) on 3.0-dev that #23980 expects.
- Adjusted the cherry-picked unit tests (`deletion_partition_test.go`,
`insert_partition_test.go`) to use the 2-argument
`testutil.MakeInt64Vector`/`MakeRowIdVector` signatures present on
3.0-dev, and renamed the partition `ExprWithRowID` field reference to
`Expr`.
- De-duplicated `TestResetWithSameTypeResetsClass` /
`TestFunctionResultAppendNullAfterToConst` (already present on 3.0-dev).
- Added support for DATE input under
`MYSQL_TYPE_DATETIME`/`MYSQL_TYPE_TIMESTAMP` in
`appendResultSetBinaryRow2` and brought scale/timezone-aware
DATE/DATETIME/TIME/TIMESTAMP formatting into `appendResultSetTextRow`
(matches `main`).
- A handful of refreshed BVT result files from #23413 were dropped
because the underlying BVT cases don't exist on 3.0-dev.

## Special notes for your reviewer:

CI on this branch will validate the BVT delta. Tested locally with `go
test -tags matrixone_test ./pkg/frontend/...
./pkg/sql/colexec/{insert,deletion,preinsert,multi_update}/...
./pkg/container/vector/...` — all green (with `TZ=UTC` for the
pre-existing TZ-sensitive `TestRowToString`).

---------

Co-authored-by: gouhongshen <[email protected]>
Co-authored-by: robll-v1 <[email protected]>
Co-authored-by: Cao Kai <[email protected]>
Co-authored-by: XuPeng-SH <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <[email protected]>
fengttt pushed a commit to fengttt/matrixone that referenced this pull request May 7, 2026
Adds the missing server_id system variable to MatrixOne so ODBC clients can read @@server_id during connection initialization without error. Also adds regression coverage in the distributed system variable tests. This prevents Tableau/ODBC connections from failing with “system variable does not exist.”

Approved by: @fengttt, @heni02, @XuPeng-SH

This branch was previously deployed

1 inactive deployment
ci — 0ef232bc Deployed Jan 27, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug fix size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants