Comments - Connecting
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.
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.