Cleaning A Connection Before Reuse
When a connection is disconnected by either implicit and explicit connection pooling, some cleaning is performed before returning it to the pool.
The cleaning performed before returning a connection to the pool includes:
- Rolling back the transaction
- Unsetting all session variables
- Setting the isolation level (the Node.js driver sets the isolation level to the default value, read committed, or the value provided by the user)
- Resetting the locale when a pooled connection is returned to the connection pool if the user provided the locale with the connection string or connection properties
- Setting the schema if it is provided by the user
The Node.js driver does not drop temporary tables when a pooled connection is cleaned before reuse.