Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for collation with ID>255 #52996

Open
dveeden opened this issue Apr 29, 2024 · 0 comments
Open

Support for collation with ID>255 #52996

dveeden opened this issue Apr 29, 2024 · 0 comments

Comments

@dveeden
Copy link
Contributor

dveeden commented Apr 29, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants