Skip to content

ResetConnectionAsync doesn't preserve character_set_connection #1090

Open
@bgrainger

Description

@bgrainger

ResetConnectionAsync (added in ffea494 for #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.

Activity

bgrainger

bgrainger commented on Dec 21, 2022

@bgrainger
MemberAuthor

automatically executing SET NAMES

Note that this is unnecessary for MariaDB: #1236. So the current behaviour is desirable for that DB backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bgrainger

        Issue actions

          ResetConnectionAsync doesn't preserve `character_set_connection` · Issue #1090 · mysql-net/MySqlConnector