MySQL 8.4 C API Developer Guide
void
mysql_stmt_data_seek(MYSQL_STMT *stmt,
uint64_t offset)
Seeks to an arbitrary row in a statement result set. The
offset value is a row number and should be
in the range from 0 to
mysql_stmt_num_rows(stmt)-1.
This function requires that the statement result set structure
contains the entire result of the last executed query, so
mysql_stmt_data_seek() may be
used only in conjunction with
mysql_stmt_store_result().