My Project
Public Member Functions
Materialized_cursor Class Reference
Inheritance diagram for Materialized_cursor:
Server_side_cursor Sql_alloc

List of all members.

Public Member Functions

 Materialized_cursor (select_result *result, TABLE *table)
int send_result_set_metadata (THD *thd, List< Item > &send_result_set_metadata)
virtual bool is_open () const
virtual int open (JOIN *join __attribute__((unused)))
virtual void fetch (ulong num_rows)
virtual void close ()

Detailed Description

Materialized_cursor -- an insensitive materialized server-side cursor. The result set of this cursor is saved in a temporary table at open. The cursor itself is simply an interface for the handler of the temporary table.


Member Function Documentation

void Materialized_cursor::fetch ( ulong  num_rows) [virtual]

Fetch up to the given number of rows from a materialized cursor.

Precondition: the cursor is open.

If the cursor points after the last row, the fetch will automatically close the cursor and not send any data (except the 'EOF' packet with SERVER_STATUS_LAST_ROW_SENT). This is an extra round trip and probably should be improved to return SERVER_STATUS_LAST_ROW_SENT along with the last row.

Implements Server_side_cursor.

int Materialized_cursor::send_result_set_metadata ( THD *  thd,
List< Item > &  send_result_set_metadata 
)

Preserve the original metadata to be sent to the client. Initiate sending of the original metadata to the client (call Protocol::send_result_set_metadata()).

Parameters:
thdThread identifier.
send_result_set_metadataList of fields that would be sent.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines