#include <assert.h>
#include <sys/types.h>
#include <algorithm>
#include "my_base.h"
#include "my_inttypes.h"
#include "my_table_map.h"
#include "prealloced_array.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/item_func.h"
#include "sql/iterators/row_iterator.h"
#include "sql/key_spec.h"
#include "sql/malloc_allocator.h"
#include "sql/sql_bitmap.h"
#include "sql/sql_const.h"
#include "sql_string.h"
Go to the source code of this file.
|
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) |
|
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) |
|
void | store_key_image_to_rec (Field *field, uchar *ptr, uint len) |
|
void | range_optimizer_init () |
| Global initialization of the null_element. Call on server start. More...
|
|
void | range_optimizer_free () |
| Global destruction of the null_element. Call on server stop. More...
|
|
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". More...
|
|
void | trace_quick_description (const AccessPath *path, Opt_trace_context *trace) |
|
◆ Quick_ranges
◆ Quick_ranges_array
◆ comparable_in_index()
Test if 'value' is comparable to 'field' when setting up range access for predicate "field OP value".
'field' is a field in the table being optimized for while 'value' is whatever 'field' is compared to.
- Parameters
-
cond_func | the predicate item that compares 'field' with 'value' |
field | field in the predicate |
itype | itMBR if indexed field is spatial, itRAW otherwise |
comp_type | comparator for the predicate |
value | whatever 'field' is compared to |
- Returns
- true if 'field' and 'value' are comparable, false otherwise
◆ range_optimizer_free()
void range_optimizer_free |
( |
| ) |
|
Global destruction of the null_element. Call on server stop.
◆ range_optimizer_init()
void range_optimizer_init |
( |
| ) |
|
Global initialization of the null_element. Call on server start.
◆ setup_range_optimizer_param()
◆ store_key_image_to_rec()
void store_key_image_to_rec |
( |
Field * |
field, |
|
|
uchar * |
ptr, |
|
|
uint |
len |
|
) |
| |
◆ test_quick_select()
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 |
|
) |
| |
◆ trace_quick_description()
◆ null_string