MySQL 9.0.0
Source Code Documentation
|
Declarations for implementation of server side cursors. More...
Go to the source code of this file.
Classes | |
class | Server_side_cursor |
Server_side_cursor – an interface for materialized implementation of cursors. More... | |
Functions | |
Query_result * | new_cursor_result (MEM_ROOT *mem_root, Query_result *result) |
bool | mysql_open_cursor (THD *thd, Query_result *result, Server_side_cursor **res) |
Attempt to open a materialized cursor. More... | |
Declarations for implementation of server side cursors.
Only read-only non-scrollable cursors are currently implemented.
bool mysql_open_cursor | ( | THD * | thd, |
Query_result * | result, | ||
Server_side_cursor ** | pcursor | ||
) |
Attempt to open a materialized cursor.
thd | thread handle | |
[in] | result | result class of the caller used as a destination for the rows fetched from the cursor |
[in,out] | pcursor | a pointer to store a pointer to cursor in. The cursor is usually created on first call. Notice that a cursor may be returned even though execution causes an error. Cursor is open when execution is successful, closed otherwise. |
On subsequent invocations, the query result object is located inside the preparable statement and the cursor object is located inside this. A reference to the cursor object is returned in pcursor.
On all invocations, the statement is executed and a temporary table managed by the cursor object is populated with the result set.
Query_result * new_cursor_result | ( | MEM_ROOT * | mem_root, |
Query_result * | result | ||
) |