MySqlConnector
MySqlConnector copied to clipboard
ResetConnectionAsync doesn't preserve `character_set_connection`
ResetConnectionAsync (added in https://github.com/mysql-net/MySqlConnector/commit/ffea49465806367248a88dba93610381a5d1476b for https://github.com/mysql-net/MySqlConnector/issues/831) only sends a connection reset packet. This sets the connection charset to the server default charset, not the initial connection charset: https://bugs.mysql.com/bug.php?id=97633
Consequently, result sets may have the wrong encoding for commands subsequently executed on the connection.
We should abstract away this bug from the consumer by automatically executing SET NAMES. With pipelining (#1088) this won't be any less efficient.
automatically executing
SET NAMES
Note that this is unnecessary for MariaDB: https://github.com/mysql-net/MySqlConnector/issues/1236. So the current behaviour is desirable for that DB backend.