Skip to content

[Rust-dataplane] COM_SET_OPTION MULTI_STATEMENTS changes must propagate to Rust backend/migration handshake masks #1368

Open

Description

@bb7133

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

Rust dataplane rewrite parity/functional RED

  • Snapshot commit: 60efdf5e6e8226423df85033534ad748ccb129db
  • Run: run.tiproxy-rust-dataplane.set-option-capability-propagation.20260902.RED

Problem

Go updates Authenticator.capability and CmdProcessor.capability after successful COM_SET_OPTION. Rust only updates CommandSessionState.capabilities; session_engine.self.negotiated is never updated and cmd_state.capabilities() is not used by any production path. Backend/migration/change-user handshakes keep using the stale original negotiated mask.

Claim

after successful COM_SET_OPTION toggles CLIENT_MULTI_STATEMENTS, Rust should use the updated capability for later backend, migration, and change-user handshakes as Go does.

Source anchors

  • pkg/proxy/backend/backend_conn_mgr.go ComSetOption updates authenticator.capability
  • rust/crates/session-core/src/command.rs SessionMutation::SetMultiStatements
  • rust/crates/dataplane/src/session_engine.rs apply_command_mutations only cmd_state
  • rust/crates/dataplane/src/session_engine.rs plan_backend_migration_handshake(self.negotiated,...)

Boundary

  • Before: Rust backend/migration handshakes use original self.negotiated even after COM_SET_OPTION
  • After: Rust propagates cmd_state capability changes into handshake planners/encoders

Local evidence

  • run.tiproxy-rust-dataplane.set-option-capability-propagation.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