23#ifndef SQL_RANGE_OPTIMIZER_INTERNAL_H_
24#define SQL_RANGE_OPTIMIZER_INTERNAL_H_
42 const bool print_full);
51 const bool print_full);
81 const char *)
override {
92 ER_THD(thd, ER_CAPACITY_EXCEEDED),
94 "range_optimizer_max_mem_size",
95 ER_THD(thd, ER_CAPACITY_EXCEEDED_IN_RANGE_OPTIMIZER));
111 const uchar *group_prefix, uint group_prefix_len,
112 uint group_key_parts);
144#define double2rows(x) ((ha_rows)(x))
This class represents the interface for internal error handlers.
Definition: error_handler.h:46
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:425
A JSON array (ordered set of values).
Definition: opt_trace.h:826
Definition: range_optimizer.h:68
Definition: range_opt_param.h:28
Error handling class for range optimizer.
Definition: internal.h:74
bool m_has_errors
Definition: internal.h:105
bool m_is_mem_error
Definition: internal.h:106
Range_optimizer_error_handler()
Definition: internal.h:76
bool handle_condition(THD *thd, uint sql_errno, const char *, Sql_condition::enum_severity_level *level, const char *) override
Handle a sql condition.
Definition: internal.h:79
bool has_errors() const
Definition: internal.h:102
Definition: internal.h:127
int or_sel_imerge_with_checks(RANGE_OPT_PARAM *param, bool remove_jump_scans, SEL_IMERGE *imerge)
Definition: range_optimizer.cc:244
Mem_root_array< SEL_TREE * > trees
Definition: internal.h:129
bool or_sel_tree(SEL_TREE *tree)
Definition: range_optimizer.cc:179
SEL_IMERGE(MEM_ROOT *mem_root)
Definition: internal.h:131
int or_sel_tree_with_checks(RANGE_OPT_PARAM *param, bool remove_jump_scans, SEL_TREE *new_tree)
Definition: range_optimizer.cc:212
A graph of (possible multiple) key ranges, represented as a red-black binary tree.
Definition: tree.h:67
enum_severity_level
Enumeration value describing the severity of the condition.
Definition: sql_error.h:62
@ SL_ERROR
Definition: sql_error.h:62
@ SL_WARNING
Definition: sql_error.h:62
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:35
System_variables variables
Definition: sql_lexer_thd.h:63
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4501
static MEM_ROOT mem_root
Definition: client_plugin.cc:113
const char * ER_THD(const THD *thd, int mysql_errno)
Definition: derror.cc:103
static int flag
Definition: hp_test1.cc:39
void print_tree(String *out, const char *tree_name, SEL_TREE *tree, const RANGE_OPT_PARAM *param, const bool print_full)
Definition: range_optimizer.cc:1689
void append_range_to_string(const QUICK_RANGE *range, const KEY_PART_INFO *first_key_part, String *out)
Definition: range_optimizer.cc:1657
void append_range_all_keyparts(Opt_trace_array *range_trace, String *range_string, String *range_so_far, SEL_ROOT *keypart, const KEY_PART_INFO *key_parts, const bool print_full)
Traverse an R-B tree of range conditions and append all ranges for this keypart and consecutive keypa...
Definition: range_optimizer.cc:1563
void print_key_value(String *out, const KEY_PART_INFO *key_part, const uchar *key)
Print a key to a string.
Definition: range_optimizer.cc:1380
void append_range(String *out, const KEY_PART_INFO *key_parts, const uchar *min_key, const uchar *max_key, const uint flag)
Append range info for a key part to a string.
Definition: range_optimizer.cc:1485
int index_next_different(bool is_index_scan, handler *file, KEY_PART_INFO *key_part, uchar *record, const uchar *group_prefix, uint group_prefix_len, uint group_key_parts)
Find the next different key value by skipping all the rows with the same key value.
Definition: range_optimizer.cc:1352
unsigned long long int ulonglong
Definition: my_inttypes.h:55
unsigned char uchar
Definition: my_inttypes.h:51
static int record
Definition: mysqltest.cc:194
#define EE_CAPACITY_EXCEEDED
Definition: mysys_err.h:77
Shared sentinel node for all trees.
Definition: internal.h:63
SEL_ARG * null_element
Definition: range_optimizer.cc:156
required string key
Definition: replication_asynchronous_connection_failover.proto:59
void push_warning_printf(THD *thd, Sql_condition::enum_severity_level severity, uint code, const char *format,...)
Push the warning to error list if there is still room in the list.
Definition: sql_error.cc:683
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:82
Definition: rowid_ordered_retrieval_plan.h:43
Definition: gen_lex_token.cc:148