MySQL :: MySQL 8.4 C API Developer Guide :: 7.4.7 mysql_reset_connection_nonblocking() (original) (raw)
Description
Note
mysql_reset_connection_nonblocking() is an asynchronous function. It is the counterpart of themysql_reset_connection() synchronous function, for use by applications that require asynchronous communication with the server. For general information about writing asynchronous C API applications, see Chapter 7, C API Asynchronous Interface.
mysql_reset_connection_nonblocking() is used similarly tomysql_reset_connection(). For details about the latter, seeSection 5.4.65, “mysql_reset_connection()”. The two functions differ as follows:
- mysql_reset_connection() returns a zero for success or a nonzero if an error occurred.
- mysql_reset_connection_nonblocking() returns an
enum net_async_status
status indicator.
Ifmysql_reset_connection_nonblocking() returnsNET_ASYNC_COMPLETE
, then connection state has cleared successfully. Otherwise, continue to callmysql_reset_connection_nonblocking() from the client application until the function returns statusNET_ASYNC_COMPLETE
. ANET_ASYNC_ERROR
return status indicates an error.
mysql_reset_connection_nonblocking() was added in MySQL 8.1.0.