This story starts with a pull request for go-mysql to allow setting the collation in auth handshake that I was reviewing. The reason why the author wanted to do this is to speedup the connection setup as he has a latency sensitive application and a lot of connection setups and tear downs. While looking at this I noticed that the collation would be stored in a single byte. However the list of supported collations shows collations with an ID that’s more than 255. mysql> SELECT MIN(ID),MAX(ID) FROM information_schema.collations; +---------+---------+ | MIN(ID) | MAX(ID) | +---------+---------+ | 1 | 323 | +---------+---------+ 1 row in set (0.00 sec) The protocol documentation for Protocol::HandshakeResponse41 says that the value sent here is only the lower 8-bits. So I was wondering how do other connectors send this to the server? Are the other 8-bits sent elsewhere in the protocol? So I used MySQL Connector/Python to try this out. import mysql.connector c = mysq...