25#ifndef SQL_RANGE_OPTIMIZER_RANGE_OPTIMIZER_H_
26#define SQL_RANGE_OPTIMIZER_RANGE_OPTIMIZER_H_
182 ha_rows limit,
bool force_quick_range,
184 bool skip_records_in_range,
Item *cond,
185 Key_map *needed_reg,
bool ignore_table_scan,
Definition: sql_bitmap.h:137
imagetype
Definition: field.h:727
Functype
Definition: item_func.h:176
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:850
A per-session context which is always available at any point of execution, because in practice it's a...
Definition: opt_trace_context.h:89
Definition: range_optimizer.h:68
void make_max_endpoint(key_range *kr)
Initializes a key_range object for communication with storage engine.
Definition: range_optimizer.h:159
uint16 flag
Stores bitwise-or'ed bits defined in enum key_range_flags.
Definition: range_optimizer.h:74
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:104
uint16 min_length
Definition: range_optimizer.h:71
uint16 max_length
Definition: range_optimizer.h:71
QUICK_RANGE()
Definition: range_optimizer.cc:269
uchar * min_key
Definition: range_optimizer.h:70
key_part_map min_keypart_map
Definition: range_optimizer.h:81
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:143
key_part_map max_keypart_map
Definition: range_optimizer.h:82
uchar * max_key
Definition: range_optimizer.h:70
void make_min_endpoint(key_range *kr)
Initializes a key_range object for communication with storage engine.
Definition: range_optimizer.h:120
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:80
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:1155
Definition: range_opt_param.h:28
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:166
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
static MEM_ROOT mem_root
Definition: client_plugin.cc:109
enum_order
Definition: key_spec.h:64
This file includes constants used by all storage engines.
ha_rkey_function
Definition: my_base.h:77
@ HA_READ_KEY_EXACT
Definition: my_base.h:78
@ HA_READ_AFTER_KEY
Definition: my_base.h:81
@ HA_READ_BEFORE_KEY
Definition: my_base.h:82
@ HA_READ_KEY_OR_NEXT
Definition: my_base.h:79
@ NEAR_MIN
Definition: my_base.h:1081
@ EQ_RANGE
Definition: my_base.h:1095
@ NEAR_MAX
Definition: my_base.h:1083
ulong key_part_map
Definition: my_base.h:1006
my_off_t ha_rows
Definition: my_base.h:1139
Some integer typedefs for easier portability.
uint8_t uint8
Definition: my_inttypes.h:62
unsigned char uchar
Definition: my_inttypes.h:51
uint16_t uint16
Definition: my_inttypes.h:64
uint64_t table_map
Definition: my_table_map.h:29
static char * path
Definition: mysqldump.cc:133
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:448
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:1235
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:341
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:523
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:192
Definition: range_optimizer.h:54
Field::imagetype image_type
Definition: range_optimizer.h:65
uint16 store_length
Definition: range_optimizer.h:57
uint16 flag
Definition: range_optimizer.h:63
uint8 null_bit
Definition: range_optimizer.h:58
Field * field
Definition: range_optimizer.h:64
uint16 part
Definition: range_optimizer.h:55
uint16 key
Definition: range_optimizer.h:55
uint16 length
Definition: range_optimizer.h:57
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:82
Definition: my_bitmap.h:42
Definition: my_base.h:1123
uint length
Definition: my_base.h:1125
enum ha_rkey_function flag
Definition: my_base.h:1127
key_part_map keypart_map
Definition: my_base.h:1126
const uchar * key
Definition: my_base.h:1124
unsigned int uint
Definition: uca9-dump.cc:74