Skip to content

Support for collation with ID>255 #52996

Open
@dveeden

Description

Bug Report

Many places use a int or uint8 for the Collation ID. This breaks collations with an ID above 255.

$ git grep -iE 'collation *(uint8|int)(,|$|\ )'
pkg/server/conn.go:     collation     uint8                 // collation used by client, may be different from the collation used by database.
pkg/server/driver.go:   OpenCtx(connID uint64, capability uint32, collation uint8, dbname string, tlsState *tls.ConnectionState, extensions *extension.SessionExtensions) (*TiDBContext, error)
pkg/server/driver_tidb.go:func (qd *TiDBDriver) OpenCtx(connID uint64, capability uint32, collation uint8, _ string,
pkg/server/internal/handshake/handshake.go:     Collation  uint8

Also there is quite a bit of duplication between these:

  • pkg/parser/mysql/charset.go
  • pkg/parser/charset/charset.go

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions