Skip to content

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

Open

Description

@wjhuang2016

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions