You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When only the charset is specified, the SET NAMES query is sent and the server's default collation is used.
When both the charset and collation are specified, the SET NAMES COLLATE query is sent.
When only the collation is specified, the collation is specified in the protocol handshake and the SET NAMES query is not sent. This can save one roundtrip, but note that the server may ignore the specified collation silently and use the server's default charset/collation instead.
Unfortunately, the limits imposed by https://github.com/go-sql-driver/mysql/blob/master/packets.go#L325-L336 seem to apply regardless of if you are the only collation case or the both charset and collation case, which limits the use of "similar but not the same" newer mysql collations, such as utf8mb4_0900_as_ci (notice this is the as / accent sensitive collation, not ai_ci)
Issue description
According to: https://github.com/go-sql-driver/mysql?tab=readme-ov-file#unicode-support
Unfortunately, the limits imposed by https://github.com/go-sql-driver/mysql/blob/master/packets.go#L325-L336 seem to apply regardless of if you are the
only collation
case or theboth charset and collation
case, which limits the use of "similar but not the same" newer mysql collations, such asutf8mb4_0900_as_ci
(notice this is the as / accent sensitive collation, not ai_ci)Example code
Error log
Configuration
*Driver version (or git SHA):*v1.8.1
Go version: go version go1.22.0 darwin/amd64
Server version: Mysql 8.x
The text was updated successfully, but these errors were encountered: