int mysql_reset_connection(MYSQL *mysql)
Resets the connection to clear the session state.
effects similar to
mysql_change_user() or an
auto-reconnect except that the connection is not closed and
reopened, and reauthentication is not done. See
Section 184.108.40.206, “mysql_change_user()”) and see
Section 27.8.20, “C API Automatic Reconnection Control”).
The connection-related state is affected as follows:
Any active transactions are rolled back and autocommit mode is reset.
All table locks are released.
TEMPORARYtables are closed (and dropped).
Session system variables are reinitialized to the values of the corresponding global system variables, including system variables that are set implicitly by statements such as
User variable settings are lost.
Prepared statements are released.
HANDLERvariables are closed.
The value of
LAST_INSERT_ID()is reset to 0.
Locks acquired with