MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JOIN_CACHE Class Reference
Inheritance diagram for JOIN_CACHE:
Collaboration diagram for JOIN_CACHE:

Public Types

enum  { ALG_NONE = 0, ALG_BNL = 1, ALG_BKA = 2, ALG_BKA_UNIQUE = 4 }
- Public Types inherited from QEP_operation
enum  enum_op_type { OT_CACHE, OT_TMP_TABLE }

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 ()
void free ()
- Public Member Functions inherited from QEP_operation
 QEP_operation (JOIN_TAB *tab)

Public Attributes

JOIN_CACHEprev_cache
JOIN_CACHEnext_cache
- Public Attributes inherited from QEP_operation
JOIN_TABjoin_tab

Protected Member Functions

uint offset_size (uint 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
JOINjoin
uint tables
uint fields
uint flag_fields
uint blobs
uint referenced_fields
uint data_field_count
uint data_field_ptr_count
CACHE_FIELDfield_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

Additional Inherited Members

- Static Public Member Functions inherited from Sql_alloc
static void * operator new (size_t size) throw ()
static void * operator new[] (size_t size) throw ()
static void * operator new[] (size_t size, MEM_ROOT *mem_root) throw ()
static void * operator new (size_t size, MEM_ROOT *mem_root) throw ()
static void operator delete (void *ptr, size_t size)
static void operator delete (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, size_t size)

Detailed Description

Definition at line 89 of file sql_join_buffer.h.

Member Enumeration Documentation

anonymous enum

Bits describing cache's type

See Also
setup_join_buffering()

Definition at line 473 of file sql_join_buffer.h.

Member Function Documentation

virtual uint JOIN_CACHE::aux_buffer_min_size ( ) const
inlineprotectedvirtual

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.

Definition at line 330 of file sql_join_buffer.h.

bool JOIN_CACHE::calc_check_only_first_match ( const JOIN_TAB t) const
inlineprotected
Returns
whether we should check only the first match for this table

Definition at line 383 of file sql_join_buffer.h.

Here is the call graph for this function:

enum_nested_loop_state JOIN_CACHE::end_send ( )
inlinevirtual

Finalize records sending.

Implements QEP_operation.

Definition at line 447 of file sql_join_buffer.h.

void JOIN_CACHE::free ( void  )
inlinevirtual

Internal state cleanup.

Reimplemented from QEP_operation.

Definition at line 453 of file sql_join_buffer.h.

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 ( )
inlinevirtual

Put a new record into the operation's buffer

Returns
return one of enum_nested_loop_state values.

Implements QEP_operation.

Definition at line 413 of file sql_join_buffer.h.

Member Data Documentation

bool JOIN_CACHE::check_only_first_match
protected

Cached value of calc_check_only_first_match(join_tab)

Definition at line 276 of file sql_join_buffer.h.


The documentation for this class was generated from the following files: