Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Currently MaxScale uses a somewhat pessimistic approach to how it resets the connections. If the username and default database match, it uses a COM_RESET_CONNECTION to reset the session state and to clear out any temporary tables and then proceeds to replay the session command history. In all other cases, the connection is reset with a COM_CHANGE_USER which is a heavy operation as it involves reauthentication.
In the case where the session state is already consistent and no temporary tables have been created, the connection could be used as-is. If only some parts of the session do not match, for example the default database, those could be fixed instead of doing a hard reset of the session. Only when the session state is unrecoverable would a reset be done.