Reconnection Behaviour Changes
Certain behaviour changes may occur after a reconnect takes place.
If a reconnect occurs, session variables and most connection settings, such as isolation level, autocommit, and current schema settings, are restored and prepared statements are still valid.
The following states are not restored after a silent reconnect and/or a reconnect after a "Connection down" error occurs:
- Temporary objects (such as local temporary tables and rows in global temporary tables).
- Result sets and cursors open at the time of the reconnect.
- The current transactional DDL setting.
- The connection ID.
- Switching the database user using the CONNECT statement.
- For example, CONNECT <new_user> PASSWORD <Password1>.
- transaction_access_mode and transaction_lock_wait_timeout are reset to their default mode even though the application did not end the transaction.
- Routing information from prepared statements is cleared, therefore the first execution of each already prepared statement does not hint route after the reconnect occurs. The second and subsequent execution of an already prepared statement attempts to route.