My Project
|
Public Types | |
typedef void(handler::* | range_check_toggle_func_t )(bool on) |
Public Member Functions | |
void | init (handler *h_arg, TABLE *table_arg) |
int | dsmrr_init (handler *h, RANGE_SEQ_IF *seq_funcs, void *seq_init_param, uint n_ranges, uint mode, HANDLER_BUFFER *buf) |
void | dsmrr_close () |
void | reset () |
int | dsmrr_fill_buffer () |
int | dsmrr_next (char **range_info) |
ha_rows | dsmrr_info (uint keyno, uint n_ranges, uint keys, uint *bufsz, uint *flags, Cost_estimate *cost) |
ha_rows | dsmrr_info_const (uint keyno, RANGE_SEQ_IF *seq, void *seq_init_param, uint n_ranges, uint *bufsz, uint *flags, Cost_estimate *cost) |
Public Attributes | |
handler * | h |
TABLE * | table |
int DsMrr_impl::dsmrr_fill_buffer | ( | ) |
DS-MRR: Fill the buffer with rowids and sort it by rowid
{This is an internal function of DiskSweep MRR implementation} Scan the MRR ranges and collect ROWIDs (or {ROWID, range_id} pairs) into buffer. When the buffer is full or scan is completed, sort the buffer by rowid and return.
The function assumes that rowids buffer is empty when it is invoked.
h | Table handler |
0 | OK, the next portion of rowids is in the buffer, properly ordered |
other | Error |
int DsMrr_impl::dsmrr_init | ( | handler * | h_arg, |
RANGE_SEQ_IF * | seq_funcs, | ||
void * | seq_init_param, | ||
uint | n_ranges, | ||
uint | mode, | ||
HANDLER_BUFFER * | buf | ||
) |
DS-MRR: Initialize and start MRR scan
Initialize and start the MRR scan. Depending on the mode parameter, this may use default or DS-MRR implementation.
The DS-MRR implementation will use a second handler object (h2) for doing scan on the index:
h_arg | Table handler to be used |
seq_funcs | Interval sequence enumeration functions |
seq_init_param | Interval sequence enumeration parameter |
n_ranges | Number of ranges in the sequence. |
mode | HA_MRR_* modes to use |
buf | INOUT Buffer to use |
0 | Ok, Scan started. |
other | Error |
void DsMrr_impl::reset | ( | void | ) |
Resets the DS-MRR object to the state it had after being intialized.
If there is an open scan then this will be closed.
This function should be called by handler::ha_reset() which is called when a statement is completed in order to make the handler object ready for re-use by a different statement.