Session-scoped variables get set for the duration of the connection, with two exceptions: COM_CHANGE_USER and COM_RESET_CONNECTION are two protocol commands which trigger session variables to be dropped. These are sometimes used by connection pool libraries to ensure a "clean" session state between application check-outs of the Connection object.
Besides that, session-scoped variables are tied to the *physical* connection, which can be replaced inside a logical Connection object for several reasons:
* Failure handled by autoReconnect=true
* Load-balancing, replication or shard-aware deployments
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.