My Project
|
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 () |
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.
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()).
thd | Thread identifier. |
send_result_set_metadata | List of fields that would be sent. |