This is a read-only copy of the MariaDB Knowledgebase generated on 2024-05-19. For the latest, interactive version please visit https://mariadb.com/kb/.

Comments - Connecting

2 weeks, 2 days ago Vladislav Vaintroub

Actually, my reading of MySQL (8.0.37) code is that neither the client nor the server use 2 byte charsets, they both use 1 byte.

I did not debug, but I doubt debugging will change what's in there

https://github.com/mysql/mysql-server/blob/mysql-8.4.0/sql/auth/sql_authentication.cc#L2975

charset_code = (uint)(uchar) * (end + 8);

https://github.com/mysql/mysql-server/blob/mysql-8.4.0/sql/auth/sql_authentication.cc#L3051

ssl_charset_code = (uint)(uchar) * ((char *)protocol->get_net()->read_pos + 8);

Both SSL and non-SSL case are 1 byte, initialized from unsigned char, read from position 8.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.