go-mysql-org / go-mysql

a powerful mysql toolset with Go
MIT License
4.52k stars 967 forks source link

collation in auth handshake are 1-byte #865

Closed dvilaverde closed 2 months ago

dvilaverde commented 2 months ago

Fix for https://github.com/go-mysql-org/go-mysql/issues/864

This adjustment reverts an earlier change that made the collation in the auth handshake 2 bytes. Now it follows the MySQL packet specification and is 1-byte. If the collation has a ID of > 255 then SET NAMES ... is called after establishing the connection.