24#ifndef SQL_RANGE_OPTIMIZER_INTERNAL_H_
25#define SQL_RANGE_OPTIMIZER_INTERNAL_H_
43 const bool print_full);
52 const bool print_full);
82 const char *)
override {
93 ER_THD(thd, ER_CAPACITY_EXCEEDED),
95 "range_optimizer_max_mem_size",
96 ER_THD(thd, ER_CAPACITY_EXCEEDED_IN_RANGE_OPTIMIZER));
112 const uchar *group_prefix, uint group_prefix_len,
113 uint group_key_parts);
145#define double2rows(x) ((ha_rows)(x))
This class represents the interface for internal error handlers.
Definition: error_handler.h:47
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:426
A JSON array (ordered set of values).
Definition: opt_trace.h:832
Definition: range_optimizer.h:69
Definition: range_opt_param.h:29
Error handling class for range optimizer.
Definition: internal.h:75
bool m_has_errors
Definition: internal.h:106
bool m_is_mem_error
Definition: internal.h:107
Range_optimizer_error_handler()
Definition: internal.h:77
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:80
bool has_errors() const
Definition: internal.h:103
Definition: internal.h:128
int or_sel_imerge_with_checks(RANGE_OPT_PARAM *param, bool remove_jump_scans, SEL_IMERGE *imerge)
Definition: range_optimizer.cc:245
Mem_root_array< SEL_TREE * > trees
Definition: internal.h:130
bool or_sel_tree(SEL_TREE *tree)
Definition: range_optimizer.cc:180
SEL_IMERGE(MEM_ROOT *mem_root)
Definition: internal.h:132
int or_sel_tree_with_checks(RANGE_OPT_PARAM *param, bool remove_jump_scans, SEL_TREE *new_tree)
Definition: range_optimizer.cc:213
A graph of (possible multiple) key ranges, represented as a red-black binary tree.
Definition: tree.h:68
enum_severity_level
Enumeration value describing the severity of the condition.
Definition: sql_error.h:63
@ SL_ERROR
Definition: sql_error.h:63
@ SL_WARNING
Definition: sql_error.h:63
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
System_variables variables
Definition: sql_lexer_thd.h:64
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4573
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
const char * ER_THD(const THD *thd, int mysql_errno)
Definition: derror.cc:104
static int flag
Definition: hp_test1.cc:40
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:1691
void append_range_to_string(const QUICK_RANGE *range, const KEY_PART_INFO *first_key_part, String *out)
Definition: range_optimizer.cc:1659
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:1565
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:1382
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:1487
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:1354
unsigned long long int ulonglong
Definition: my_inttypes.h:56
unsigned char uchar
Definition: my_inttypes.h:52
static int record
Definition: mysqltest.cc:195
#define EE_CAPACITY_EXCEEDED
Definition: mysys_err.h:78
Shared sentinel node for all trees.
Definition: internal.h:64
SEL_ARG * null_element
Definition: range_optimizer.cc:157
required string key
Definition: replication_asynchronous_connection_failover.proto:60
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:690
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: rowid_ordered_retrieval_plan.h:44
Definition: gen_lex_token.cc:149