enum net_async_statusmysql_fetch_row_nonblocking(MYSQL_RES *result, MYSQL_ROW *row)mysql_fetch_row_nonblocking() is an asynchronous function. It is the counterpart of themysql_fetch_row() synchronous function, for use by applications that require asynchronous communication with the server. For general information about writing asynchronous C API applications, seeChapter 7,C API Asynchronous Interface.
mysql_fetch_row_nonblocking() is used similarly tomysql_fetch_row(). For details about the latter, seeSection 5.4.22, “mysql_fetch_row()”. The two functions differ as follows:
mysql_fetch_row()returns aMYSQL_ROWvalue containing the next row, orNULL. The meaning of aNULLreturn depends on which function was called precedingmysql_fetch_row():When used after
mysql_store_result()ormysql_store_result_nonblocking(),mysql_fetch_row()returnsNULLif there are no more rows to retrieve.When used after
mysql_use_result(),mysql_fetch_row()returnsNULLif there are no more rows to retrieve or an error occurred.
mysql_fetch_row_nonblocking()returns anenum net_async_statusstatus indicator and takes a secondrowargument that provides a pointer to aMYSQL_ROWvalue. When the return status isNET_ASYNC_COMPLETE, therowargument is a pointer to aMYSQL_ROWvalue containing the next row, orNULL. The meaning ofNULLdepends on which function was called precedingmysql_fetch_row_nonblocking():When used after
mysql_store_result()ormysql_store_result_nonblocking(), therowargument isNULLif there are no more rows to retrieve.When used after
mysql_use_result(), therowargument isNULLif there are no more rows to retrieve or an error occurred.
mysql_fetch_row_nonblocking() was added in MySQL 8.0.16.
Returns anenum net_async_status value. See the description inSection 7.2, “C API Asynchronous Interface Data Structures”. ANET_ASYNC_ERROR return status indicates an error.