My Project
|
Public Types | |
enum | { ALG_NONE = 0, ALG_BNL = 1, ALG_BKA = 2, ALG_BKA_UNIQUE = 4 } |
Public Member Functions | |
virtual int | init ()=0 |
virtual bool | is_key_access () |
virtual void | reset_cache (bool for_writing) |
Reset the join buffer for reading/writing: default implementation. | |
virtual enum_nested_loop_state | put_record () |
virtual bool | get_record () |
virtual void | get_record_by_pos (uchar *rec_ptr) |
virtual bool | get_match_flag_by_pos (uchar *rec_ptr) |
virtual uchar * | get_curr_rec () |
virtual void | set_curr_rec_link (uchar *link) |
virtual uchar * | get_curr_rec_link () |
enum_nested_loop_state | end_send () |
enum_nested_loop_state | join_records (bool skip_last) |
enum_op_type | type () |
JOIN_CACHE (JOIN *j, JOIN_TAB *tab, JOIN_CACHE *prev) | |
void | free () |
Public Attributes | |
JOIN_CACHE * | prev_cache |
JOIN_CACHE * | next_cache |
Protected Member Functions | |
uint | offset_size (ulong len) |
ulong | get_offset (uint ofs_sz, uchar *ptr) |
void | store_offset (uint ofs_sz, uchar *ptr, ulong ofs) |
void | calc_record_fields () |
int | alloc_fields (uint external_fields) |
void | create_flag_fields () |
void | create_remaining_fields (bool all_read_fields) |
void | set_constants () |
bool | alloc_buffer () |
uint | get_size_of_rec_offset () |
uint | get_size_of_rec_length () |
uint | get_size_of_fld_offset () |
uchar * | get_rec_ref (uchar *ptr) |
ulong | get_rec_length (uchar *ptr) |
ulong | get_fld_offset (uchar *ptr) |
void | store_rec_ref (uchar *ptr, uchar *ref) |
void | store_rec_length (uchar *ptr, ulong len) |
void | store_fld_offset (uchar *ptr, ulong ofs) |
uint | write_record_data (uchar *link, bool *is_full) |
virtual uint | aux_buffer_incr () |
virtual uint | aux_buffer_min_size () const |
virtual ulong | rem_space () |
virtual bool | skip_record_if_match () |
int | read_some_record_fields () |
void | read_some_flag_fields () |
void | read_all_flag_fields_by_pos (uchar *rec_ptr) |
uint | read_record_field (CACHE_FIELD *copy, bool last_record) |
bool | read_referenced_field (CACHE_FIELD *copy, uchar *rec_ptr, uint *len) |
bool | blob_data_is_in_rec_buff (uchar *rec_ptr) |
virtual enum_nested_loop_state | join_matching_records (bool skip_last)=0 |
virtual enum_nested_loop_state | join_null_complements (bool skip_last) |
virtual void | restore_last_record () |
bool | set_match_flag_if_none (JOIN_TAB *first_inner, uchar *rec_ptr) |
enum_nested_loop_state | generate_full_extensions (uchar *rec_ptr) |
virtual bool | check_match (uchar *rec_ptr) |
bool | calc_check_only_first_match (const JOIN_TAB *t) const |
virtual bool | put_record_in_cache () |
Protected Attributes | |
uint | length |
JOIN * | join |
uint | tables |
uint | fields |
uint | flag_fields |
uint | blobs |
uint | referenced_fields |
uint | data_field_count |
uint | data_field_ptr_count |
CACHE_FIELD * | field_descr |
CACHE_FIELD ** | blob_ptr |
bool | with_match_flag |
bool | with_length |
uint | pack_length |
uint | pack_length_with_blob_ptrs |
uchar * | buff |
ulong | buff_size |
ulong | aux_buff_size |
uint | records |
uchar * | pos |
uchar * | end_pos |
uchar * | curr_rec_pos |
uchar * | last_rec_pos |
bool | last_rec_blob_data_is_in_rec_buff |
uchar * | curr_rec_link |
bool | check_only_first_match |
Friends | |
class | JOIN_CACHE_BNL |
class | JOIN_CACHE_BKA |
class | JOIN_CACHE_BKA_UNIQUE |
anonymous enum |
Bits describing cache's type
JOIN_CACHE::JOIN_CACHE | ( | JOIN * | j, |
JOIN_TAB * | tab, | ||
JOIN_CACHE * | prev | ||
) | [inline] |
This constructor creates a join cache, linked or not. The cache is to be used to join table 'tab' to the result of joining the previous tables specified by the 'j' parameter. The parameter 'prev' specifies the previous cache object to which this cache is linked, or NULL if this cache is not linked.
virtual uint JOIN_CACHE::aux_buffer_min_size | ( | ) | const [inline, protected, virtual] |
This method must determine the minimum size for the auxiliary buffer. If no auxiliary buffer is needed the function should return 0.
Reimplemented in JOIN_CACHE_BKA.
bool JOIN_CACHE::calc_check_only_first_match | ( | const JOIN_TAB * | t | ) | const [inline, protected] |
enum_nested_loop_state JOIN_CACHE::end_send | ( | ) | [inline, virtual] |
Finalize records sending.
Implements QEP_operation.
void JOIN_CACHE::free | ( | ) | [inline, virtual] |
Internal state cleanup.
Reimplemented from QEP_operation.
virtual int JOIN_CACHE::init | ( | void | ) | [pure virtual] |
Initialize operation's internal state. Called once per query execution.
Reimplemented from QEP_operation.
Implemented in JOIN_CACHE_BKA_UNIQUE, JOIN_CACHE_BKA, and JOIN_CACHE_BNL.
virtual enum_nested_loop_state JOIN_CACHE::put_record | ( | ) | [inline, virtual] |
Put a new record into the operation's buffer
Implements QEP_operation.
bool JOIN_CACHE::check_only_first_match [protected] |
Cached value of calc_check_only_first_match(join_tab)