MySQL :: MySQL 8.4 C API Developer Guide :: 5.4.65 mysql_reset_connection() (original) (raw)

Description

Resets the connection to clear the session state.

mysql_reset_connection() has effects similar tomysql_change_user() or an auto-reconnect except that the connection is not closed and reopened, and reauthentication is not done. The write set session history is reset. SeeSection 5.4.4, “mysql_change_user()”, andSection 3.6.8, “Automatic Reconnection Control”.

mysql_reset_connection() affects the connection-related state as follows:

Return Values

Zero for success. Nonzero if an error occurred.