Skip to content

[Rust-dataplane] SHOW SESSION_STATES current-db non-string/null must be ignored like Go #1366

Open

Description

@bb7133

Migrated from bb7133/tiproxy#202. Original author: wjhuang2016; created: 2026-09-02T12:43:43Z; source body SHA-256: c506916b5151c54bfa1d4417fbf969b7c18e8542b1e45540bfcecd11e919ad74.

Rust dataplane rewrite parity/functional RED

  • Snapshot commit: 60efdf5e6e8226423df85033534ad748ccb129db
  • Run: run.tiproxy-rust-dataplane.session-states-current-db-type.20260902.RED

Problem

Go updateAuthInfoFromSessionStates only applies current-db when type assertion to string succeeds; null/number is ignored. Rust validate_session_states rejects non-string values as MalformedSessionStates.

Claim

when SHOW SESSION_STATES returns current-db:null or current-db:, Rust must treat it as no authoritative database and continue, matching Go.

Source anchors

  • pkg/proxy/backend/backend_conn_mgr.go:729-739 updateAuthInfoFromSessionStates type assertion
  • rust/crates/session-core/src/internal_client.rs:757-769 validate_session_states rejects non-string

Boundary

  • Before: Rust rejects the whole snapshot as MalformedSessionStates
  • After: Go ignores non-string current-db and proceeds with current_database None

Local evidence

  • run.tiproxy-rust-dataplane.session-states-current-db-type.20260902.RED

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    migration:bb7133-tiproxyMigrated from bb7133/tiproxy with preserved provenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions