dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Implement COM_RESET_CONNECTION

Open zachmu opened this issue 1 year ago • 0 comments

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

zachmu avatar Jul 25 '22 21:07 zachmu