MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
row0sel.cc File Reference
#include "row0sel.h"
#include "dict0dict.h"
#include "dict0boot.h"
#include "trx0undo.h"
#include "trx0trx.h"
#include "btr0btr.h"
#include "btr0cur.h"
#include "btr0sea.h"
#include "mach0data.h"
#include "que0que.h"
#include "row0upd.h"
#include "row0row.h"
#include "row0vers.h"
#include "rem0cmp.h"
#include "lock0lock.h"
#include "eval0eval.h"
#include "pars0sym.h"
#include "pars0pars.h"
#include "row0mysql.h"
#include "read0read.h"
#include "buf0lru.h"
#include "ha_prototypes.h"
#include "m_string.h"
#include "my_sys.h"
#include "my_compare.h"
Include dependency graph for row0sel.cc:

Go to the source code of this file.

Macros

#define SEL_MAX_N_PREFETCH   16
#define SEL_PREFETCH_LIMIT   1
#define SEL_COST_LIMIT   100
#define SEL_FOUND   0
#define SEL_EXHAUSTED   1
#define SEL_RETRY   2
#define row_sel_field_store_in_mysql_format(dest, templ, idx, field, src, len)   row_sel_field_store_in_mysql_format_func(dest,templ,src,len)
#define row_sel_store_mysql_field(m, p, r, i, o, f, t)   row_sel_store_mysql_field_func(m,p,r,o,f,t)

Functions

UNIV_INTERN sel_node_tsel_node_create (mem_heap_t *heap)
UNIV_INTERN void sel_node_free_private (sel_node_t *node)
UNIV_INLINE void sel_eval_select_list (sel_node_t *node)
UNIV_INLINE void sel_assign_into_var_values (sym_node_t *var, sel_node_t *node)
UNIV_INLINE void sel_reset_aggregate_vals (sel_node_t *node)
UNIV_INLINE void row_sel_copy_input_variable_vals (sel_node_t *node)
UNIV_INTERN void sel_col_prefetch_buf_free (sel_buf_t *prefetch_buf)
UNIV_INLINE void sel_enqueue_prefetched_row (plan_t *plan)

Variables

static dict_index_tindex
static dict_index_t rec_t * rec
static dict_index_t rec_t ulint ** offsets
static dict_index_t rec_t
ulint mem_heap_t ** 
offset_heap
static dict_index_t rec_t
ulint mem_heap_t mem_heap_t ** 
old_vers_heap
static dict_index_t rec_t
ulint mem_heap_t mem_heap_t
rec_t ** 
old_vers

Detailed Description

Select

Created 12/19/1997 Heikki Tuuri

Definition in file row0sel.cc.

Function Documentation

UNIV_INLINE void row_sel_copy_input_variable_vals ( sel_node_t node)

Copies the input variable values when an explicit cursor is opened.

Parameters
nodein: select node

Definition at line 391 of file row0sel.cc.

Here is the call graph for this function:

UNIV_INLINE void sel_assign_into_var_values ( sym_node_t var,
sel_node_t node 
)

Assigns the values in the select list to the possible into-variables in SELECT ... INTO ...

Parameters
varin: first variable in a list of variables
nodein: select node

Definition at line 338 of file row0sel.cc.

Here is the call graph for this function:

UNIV_INTERN void sel_col_prefetch_buf_free ( sel_buf_t prefetch_buf)

Frees a prefetch buffer for a column, including the dynamically allocated memory for data stored there.

Parameters
prefetch_bufin, own: prefetch buffer

Definition at line 524 of file row0sel.cc.

Here is the caller graph for this function:

UNIV_INLINE void sel_enqueue_prefetched_row ( plan_t plan)

Pushes the column values for a prefetched, cached row to the column prefetch buffers from the val fields in the column nodes.

Parameters
planin: plan node for a table

Definition at line 610 of file row0sel.cc.

Here is the call graph for this function:

UNIV_INLINE void sel_eval_select_list ( sel_node_t node)

Evaluates the values in a select list. If there are aggregate functions, their argument value is added to the aggregate total.

Parameters
nodein: select node

Definition at line 318 of file row0sel.cc.

Here is the call graph for this function:

UNIV_INTERN sel_node_t* sel_node_create ( mem_heap_t heap)

Creates a select node struct.

Returns
own: select node struct
Parameters
heapin: memory heap where created

Definition at line 270 of file row0sel.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN void sel_node_free_private ( sel_node_t node)

Frees the memory private to a select node when a query graph is freed, does not free the heap where the node was originally created.

Parameters
nodein: select node struct

Definition at line 292 of file row0sel.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INLINE void sel_reset_aggregate_vals ( sel_node_t node)

Resets the aggregate value totals in the select list of an aggregate type query.

Parameters
nodein: select node

Definition at line 368 of file row0sel.cc.

Here is the call graph for this function:

Variable Documentation

dict_index_t* index

< in: read view in: plan node for table

Definition at line 683 of file row0sel.cc.

dict_index_t rec_t ulint mem_heap_t** offset_heap

in/out: memory heap from which the offsets are allocated

Definition at line 683 of file row0sel.cc.

dict_index_t rec_t ulint** offsets

in/out: offsets returned by rec_get_offsets(rec, plan->index)

Definition at line 683 of file row0sel.cc.

dict_index_t rec_t ulint mem_heap_t mem_heap_t rec_t** old_vers

out: old version, or NULL if the record does not exist in the view: i.e., it was freshly inserted afterwards

Definition at line 683 of file row0sel.cc.

dict_index_t rec_t ulint mem_heap_t mem_heap_t** old_vers_heap

out: old version heap to use

Definition at line 683 of file row0sel.cc.

dict_index_t rec_t* rec

in: record in a clustered index

Definition at line 683 of file row0sel.cc.