Skip to content

[Subtask]: C02 — Implement connection encodings and reject latin1 consistently #29481

Closed

Description

@ck89119

Parent Issue

#29479 — C02

Detail of Subtask

Make declared client, connection and result encodings effective at protocol boundaries.

Scope

  • Cover handshake, COM_CHANGE_USER, SET NAMES/CHARACTER SET, character_set_/collation_ assignments, literal introducers, CONVERT USING and text/prepared protocols.
  • Implement binary/ascii/utf8mb3/utf8mb4 first; expose a bounded conversion interface for GBK in C10.
  • Separate connection encoding ownership from column repertoire validation; preserve binary parameters as bytes.

Acceptance criteria

  • utf8mb3 rejects supplementary characters, utf8mb4 accepts them, ascii enforces its repertoire and binary round-trips arbitrary bytes.
  • Malformed input and unrepresentable output follow the pinned MySQL contract; validate actual bytes and metadata.
  • Every new latin1/latin1_* request, including handshake and SET, is explicitly rejected; failed session changes leave prior state intact.
  • NULL, long-data chunks, repeated parameter rebinding, cancellation and disconnect release conversion buffers without unbounded session caches.

Describe implementation you've considered

Convert only at explicit boundaries. Keeping a legacy protocol-ID lookup does not authorize that encoding. Extend existing protocol/driver tests.

Additional information

  • Prerequisites: C01: [Subtask]: C01 — Unify supported charset/collation identities and versioned metadata #29480
  • Existing implementation references: No dedicated implementation PR is claimed.
  • Native SQL activation also requires the applicable C11 upgrade and C12 release gates.
  • Shared scope: five charset families and twelve canonical collations; latin1/latin1_* are explicitly unsupported for new requests.
  • Exclusions: partition tables, stored procedures, UDFs, warning count/text compatibility, utf16/utf32/gb18030 and other unlisted collations.
  • Existing product defaults are not changed incidentally. Preserve legacy objects; do not use accepted DDL or a backend-only test as end-to-end evidence.
  • This issue does not itself approve a production design, an open PR, or unverified CI evidence.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions