Skip to content

[Rust-dataplane] Rust dataplane must mask Go-unsupported client capabilities during frontend negotiation #1371

Open

Description

@bb7133

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

Rust dataplane rewrite parity/functional RED

  • Snapshot commit: 60efdf5e6e8226423df85033534ad748ccb129db
  • Run: run.tiproxy-rust-dataplane.unsupported-capability-masking.20260902.RED

Problem

Go SupportedServerCapabilities excludes NO_SCHEMA/IGNORE_SPACE/IGNORE_SIGPIPE/PS_MULTI_RESULTS; Go negotiates commonCaps = frontend & proxy. Rust production proxy_capability_base() includes all four extras and passes that mask into negotiate_frontend.

Claim

when a MySQL client advertises Go-unsupported capability bits, Rust must mask them out of negotiated capabilities and report them as unsupported_by_proxy exactly like Go.

Source anchors

  • pkg/proxy/backend/authenticator.go:37-54 SupportedServerCapabilities excludes extras
  • pkg/proxy/backend/authenticator.go:152-155 commonCaps = frontendCapability & proxyCapability
  • rust/crates/dataplane/src/session_engine.rs:160-185 proxy_capability_base includes extras
  • rust/crates/dataplane/src/session_engine.rs:1540 proxy_capabilities passed to negotiate_frontend
  • rust/crates/session-core/src/handshake.rs:38 SUPPORTED_SERVER_CAPABILITIES Go literal
  • rust/crates/session-core/src/handshake.rs:233-260 negotiate_frontend

Boundary

  • Before: Rust negotiated capabilities retain NO_SCHEMA/IGNORE_SPACE/IGNORE_SIGPIPE/PS_MULTI_RESULTS
  • After: Go-negotiated capabilities retain only PROTOCOL_41 for the probe client; unsupported extras are masked

Local evidence

  • run.tiproxy-rust-dataplane.unsupported-capability-masking.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