![]() |
MySQL 8.0.29
Source Code Documentation
|
#include "sql/sql_cursor.h"
#include <assert.h>
#include <sys/types.h>
#include <algorithm>
#include <utility>
#include "memory_debugging.h"
#include "my_alloc.h"
#include "my_base.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "mysql/components/services/bits/psi_statement_bits.h"
#include "mysql_com.h"
#include "sql/debug_sync.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/item.h"
#include "sql/parse_tree_node_base.h"
#include "sql/protocol.h"
#include "sql/query_options.h"
#include "sql/query_result.h"
#include "sql/sql_cmd_dml.h"
#include "sql/sql_digest_stream.h"
#include "sql/sql_lex.h"
#include "sql/sql_list.h"
#include "sql/sql_parse.h"
#include "sql/sql_tmp_table.h"
#include "sql/sql_union.h"
#include "sql/system_variables.h"
#include "sql/table.h"
#include "sql/thd_raii.h"
Classes | |
class | Materialized_cursor |
Materialized_cursor – an insensitive materialized server-side cursor. More... | |
class | Query_result_materialize |
Query_result_materialize – a mediator between a cursor query and the protocol. More... | |
Functions | |
bool | mysql_open_cursor (THD *thd, Query_result *result, Server_side_cursor **pcursor) |
Attempt to open a materialized cursor. More... | |
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.