26#ifndef SQL_RANGE_OPTIMIZER_RANGE_OPTIMIZER_H_
27#define SQL_RANGE_OPTIMIZER_RANGE_OPTIMIZER_H_
183 ha_rows limit,
bool force_quick_range,
185 bool skip_records_in_range,
Item *cond,
186 Key_map *needed_reg,
bool ignore_table_scan,
Definition: sql_bitmap.h:154
imagetype
Definition: field.h:730
Functype
Definition: item_func.h:209
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:930
A per-session context which is always available at any point of execution, because in practice it's a...
Definition: opt_trace_context.h:94
Definition: range_optimizer.h:69
void make_max_endpoint(key_range *kr)
Initializes a key_range object for communication with storage engine.
Definition: range_optimizer.h:160
uint16 flag
Stores bitwise-or'ed bits defined in enum key_range_flags.
Definition: range_optimizer.h:75
void make_min_endpoint(key_range *kr, uint prefix_length, key_part_map keypart_map)
Initializes a key_range object for communication with storage engine.
Definition: range_optimizer.h:105
uint16 min_length
Definition: range_optimizer.h:72
uint16 max_length
Definition: range_optimizer.h:72
QUICK_RANGE()
Definition: range_optimizer.cc:269
uchar * min_key
Definition: range_optimizer.h:71
key_part_map min_keypart_map
Definition: range_optimizer.h:82
void make_max_endpoint(key_range *kr, uint prefix_length, key_part_map keypart_map)
Initializes a key_range object for communication with storage engine.
Definition: range_optimizer.h:144
key_part_map max_keypart_map
Definition: range_optimizer.h:83
uchar * max_key
Definition: range_optimizer.h:71
void make_min_endpoint(key_range *kr)
Initializes a key_range object for communication with storage engine.
Definition: range_optimizer.h:121
enum ha_rkey_function rkey_func_flag
Stores one of the HA_READ_MBR_XXX items in enum ha_rkey_function, only effective when flag has a GEOM...
Definition: range_optimizer.h:81
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:1159
Definition: range_opt_param.h:29
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
enum_order
Definition: key_spec.h:65
This file includes constants used by all storage engines.
ha_rkey_function
Definition: my_base.h:78
@ HA_READ_KEY_EXACT
Definition: my_base.h:79
@ HA_READ_AFTER_KEY
Definition: my_base.h:82
@ HA_READ_BEFORE_KEY
Definition: my_base.h:83
@ HA_READ_KEY_OR_NEXT
Definition: my_base.h:80
@ NEAR_MIN
Definition: my_base.h:1083
@ EQ_RANGE
Definition: my_base.h:1097
@ NEAR_MAX
Definition: my_base.h:1085
ulong key_part_map
Definition: my_base.h:1008
my_off_t ha_rows
Definition: my_base.h:1141
Some integer typedefs for easier portability.
uint8_t uint8
Definition: my_inttypes.h:63
unsigned char uchar
Definition: my_inttypes.h:52
uint16_t uint16
Definition: my_inttypes.h:65
uint64_t table_map
Definition: my_table_map.h:30
static char * path
Definition: mysqldump.cc:149
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
void trace_quick_description(const AccessPath *path, Opt_trace_context *trace)
Definition: range_optimizer.cc:260
void store_key_image_to_rec(Field *field, uchar *ptr, uint len)
Definition: partition_pruning.cc:449
bool comparable_in_index(Item *cond_func, const Field *field, const Field::imagetype itype, Item_func::Functype comp_type, const Item *value)
Test if 'value' is comparable to 'field' when setting up range access for predicate "field OP value".
Definition: range_optimizer.cc:1212
bool setup_range_optimizer_param(THD *thd, MEM_ROOT *return_mem_root, MEM_ROOT *temp_mem_root, Key_map keys_to_use, TABLE *table, Query_block *query_block, RANGE_OPT_PARAM *param)
Definition: range_optimizer.cc:302
void range_optimizer_free()
Global destruction of the null_element. Call on server stop.
Definition: range_optimizer.cc:167
int test_quick_select(THD *thd, MEM_ROOT *return_mem_root, MEM_ROOT *temp_mem_root, Key_map keys_to_use, table_map prev_tables, table_map read_tables, ha_rows limit, bool force_quick_range, const enum_order interesting_order, TABLE *table, bool skip_records_in_range, Item *cond, Key_map *needed_reg, bool ignore_table_scan, Query_block *query_block, AccessPath **path)
Definition: range_optimizer.cc:484
void range_optimizer_init()
Global initialization of the null_element. Call on server start.
Definition: range_optimizer.cc:161
File containing constants that can be used throughout the server.
Our own string classes, used pervasively throughout the executor.
Access paths are a query planning structure that correspond 1:1 to iterators, in that an access path ...
Definition: access_path.h:227
Definition: range_optimizer.h:55
Field::imagetype image_type
Definition: range_optimizer.h:66
uint16 store_length
Definition: range_optimizer.h:58
uint16 flag
Definition: range_optimizer.h:64
uint8 null_bit
Definition: range_optimizer.h:59
Field * field
Definition: range_optimizer.h:65
uint16 part
Definition: range_optimizer.h:56
uint16 key
Definition: range_optimizer.h:56
uint16 length
Definition: range_optimizer.h:58
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: my_bitmap.h:43
Definition: my_base.h:1125
uint length
Definition: my_base.h:1127
enum ha_rkey_function flag
Definition: my_base.h:1129
key_part_map keypart_map
Definition: my_base.h:1128
const uchar * key
Definition: my_base.h:1126