Process remaining rows

The mi_exec() function opens an implicit cursor to hold the resulting rows of a query. For such queries, the mi_query_finish() function ensures that the database server processes the results of a statement. The mi_query_finish() function processes all the remaining rows in the cursor of the current statement and throws them away.

If the current statement failed, mi_query_finish() returns MI_ERROR. In this case, mi_query_finish() guarantees that the database server is ready for the next statement (unless the database server has dropped the connection). All callbacks are properly invoked during mi_query_finish() processing.