Skip to content

Implement COM_RESET_CONNECTION#2310

Merged
fulghum merged 5 commits intomainfrom
fulghum/com-reset
Feb 6, 2024
Merged

Implement COM_RESET_CONNECTION#2310
fulghum merged 5 commits intomainfrom
fulghum/com-reset

Conversation

@fulghum
Copy link
Contributor

@fulghum fulghum commented Feb 2, 2024

Implements the COM_RESET_CONNECTION command to allow a sql-server to clear session state on a connection so that it can be safely reused, for example, in connection pools.

This matches MySQL's behavior, but customers may see a behavior change from this if they are relying on the old behavior. For example, if customers are relying on prepared statements to remain available in a session after it has been released to a connection pool and then reassigned to a new worker thread. The behavior now matches MySQL, where prepared statements, session vars, and user vars are all reset on a connection when the COM_RESET_CONNECTION command is executed on a connection.

Depends on dolthub/vitess#308

Related to dolthub/dolt#3921

@fulghum fulghum marked this pull request as ready for review February 5, 2024 23:58
@fulghum fulghum requested a review from zachmu February 5, 2024 23:58
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fulghum fulghum merged commit 07016f4 into main Feb 6, 2024
@fulghum fulghum deleted the fulghum/com-reset branch February 6, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants