The mi_query_interrupt() function
The mi_query_interrupt() function interrupts the current statement.
Syntax
mi_integer mi_query_interrupt(conn, block_until_acknowledged)
MI_CONNECTION *conn;
mi_integer block_until_acknowledged;
- conn
- A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
- block_until_acknowledged
- This value is currently ignored.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_query_interrupt() function interrupts execution of the current statement on the connection that conn references. The current statement is the most recently executed SQL statement sent to the database server on that connection. This function releases the resources for the current statement. If the current statement was a query, mi_query_interrupt() closes any implicit cursor that mi_exec() or mi_exec_prepared_statement() opened to hold the rows.
The mi_query_interrupt() function does not affect prepared statements or calls to DataBlade® API file-access functions. After mi_query_interrupt() executes, the next iteration of the mi_get_result() function returns a status of MI_NO_MORE_RESULTS.
Return values
- MI_OK
- The function was successful; the query was either successfully interrupted or had already completed.
- MI_ERROR
- The function was not successful; an exception was encountered.