MySQL 8.0 C API Developer Guide
enum net_async_status
mysql_fetch_row_nonblocking(MYSQL_RES *result,
MYSQL_ROW *row)
mysql_fetch_row_nonblocking()
is an asynchronous function. It is the counterpart of the
mysql_fetch_row()
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_fetch_row_nonblocking()
is used similarly to
mysql_fetch_row(). For details
about the latter, see Section 5.4.22, “mysql_fetch_row()”. The
two functions differ as follows:
mysql_fetch_row() returns
a MYSQL_ROW value containing the next
row, or NULL. The meaning of a
NULL return depends on which function
was called preceding
mysql_fetch_row():
When used after
mysql_store_result()
or
mysql_store_result_nonblocking(),
mysql_fetch_row()
returns NULL if there are no more
rows to retrieve.
When used after
mysql_use_result(),
mysql_fetch_row()
returns NULL if there are no more
rows to retrieve or an error occurred.
mysql_fetch_row_nonblocking()
returns an enum net_async_status status
indicator and takes a second row
argument that provides a pointer to a
MYSQL_ROW value. When the return status
is NET_ASYNC_COMPLETE, the
row argument is a pointer to a
MYSQL_ROW value containing the next
row, or NULL. The meaning of
NULL depends on which function was
called preceding
mysql_fetch_row_nonblocking():
When used after
mysql_store_result()
or
mysql_store_result_nonblocking(),
the row argument is
NULL if there are no more rows to
retrieve.
When used after
mysql_use_result(),
the row argument is
NULL if there are no more rows to
retrieve or an error occurred.
mysql_fetch_row_nonblocking()
was added in MySQL 8.0.16.
Returns an enum net_async_status value. See
the description in
Section 7.2, “C API Asynchronous Interface Data Structures”. A
NET_ASYNC_ERROR return status indicates an
error.