Skip to content

Implement COM_RESET_CONNECTION #3921

@zachmu

Description

@zachmu

Our current guidance for connection pooling is either don't do it, or be very careful to reinitialize any connection by checking out the desired branch before use. The reason for this caution is that sharing connections via pooling risks transferring session state (e.g. which branch is checked out) between sessions, which could cause application bugs.

We can at least partially address this by implementing COM_RESET_CONNECTION and resetting session state. It's not clear if it's compatible with all pools, but it seems to be supported in the golang MySQL driver and others.

https://dev.mysql.com/doc/internals/en/com-reset-connection.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions