|
static store_key * | get_store_key (THD *thd, Item *val, table_map used_tables, table_map const_tables, const KEY_PART_INFO *key_part, uchar *key_buff, uint maybe_null) |
|
static bool | retry_with_secondary_engine (THD *thd) |
| Checks if a query should be retried using a secondary storage engine. More...
|
|
bool | is_show_cmd_using_system_view (THD *thd) |
| Check whether the statement is a SHOW command using INFORMATION_SCHEMA system views. More...
|
|
static ulong | get_max_execution_time (THD *thd) |
| Get the maximum execution time for a statement. More...
|
|
static bool | is_timer_applicable_to_statement (THD *thd) |
| Check whether max statement time is applicable to statement or not. More...
|
|
bool | set_statement_timer (THD *thd) |
| Set the time until the currently running statement is aborted. More...
|
|
void | reset_statement_timer (THD *thd) |
| Deactivate the timer associated with the statement that was executed. More...
|
|
bool | reads_not_secondary_columns (const LEX *lex) |
| Checks if a query reads a column that is not available in the secondary engine (i.e. More...
|
|
static bool | has_secondary_engine_defined (const LEX *lex) |
|
static bool | equal_engines (const LEX_CSTRING &engine1, const LEX_CSTRING &engine2) |
|
const MYSQL_LEX_CSTRING * | get_eligible_secondary_engine_from (const LEX *lex) |
|
const handlerton * | get_secondary_engine_handlerton (const LEX *lex) |
| Returns secondary_engine handler for the statement. More...
|
|
std::string_view | get_secondary_engine_fail_reason (const LEX *lex) |
|
std::string_view | find_secondary_engine_fail_reason (const LEX *lex) |
|
static bool | set_secondary_engine_fail_reason (const LEX *lex, std::string_view reason) |
|
void | set_fail_reason_and_raise_error (const LEX *lex, std::string_view reason) |
|
void | find_and_set_offload_fail_reason (const LEX *lex) |
|
bool | validate_use_secondary_engine (const LEX *lex) |
| Validates a query that uses the secondary engine. More...
|
|
bool | has_external_table (const LEX *lex) |
| Checks if any of the tables referenced belong to an external engine. More...
|
|
void | accumulate_statement_cost (const LEX *lex) |
| Calculates the cost of executing a statement, including all its subqueries and stores it in thd->m_current_query_cost. More...
|
|
bool | anonymous_namespace{sql_select.cc}::SecondaryEngineCallPrePrepareHook (THD *thd, const LEX_CSTRING &secondary_engine) |
| Gets the secondary storage engine pre prepare hook function, if any. More...
|
|
bool | optimize_secondary_engine (THD *thd) |
| Perform query optimizations that are specific to a secondary storage engine. More...
|
|
void | notify_plugins_after_select (THD *thd, const Sql_cmd *cmd) |
| Notify plugins about an executed SELECT statement. More...
|
|
static bool | check_locking_clause_access (THD *thd, Global_tables_list tables) |
| Performs access check for the locking clause, if present. More...
|
|
bool | types_allow_materialization (Item *outer, Item *inner) |
| Check if two items are compatible wrt. More...
|
|
static bool | sj_table_is_included (JOIN *join, JOIN_TAB *join_tab) |
|
SJ_TMP_TABLE * | create_sj_tmp_table (THD *thd, JOIN *join, SJ_TMP_TABLE_TAB *first_tab, SJ_TMP_TABLE_TAB *last_tab) |
| Set up the support structures (NULL bits, row offsets, etc.) for a semijoin duplicate weedout table. More...
|
|
static bool | setup_semijoin_dups_elimination (JOIN *join, uint no_jbuf_after) |
| Setup the strategies to eliminate semi-join duplicates. More...
|
|
static void | destroy_sj_tmp_tables (JOIN *join) |
|
bool | check_privileges_for_join (THD *thd, mem_root_deque< Table_ref * > *tables) |
| Check privileges for column references in a JOIN expression. More...
|
|
bool | check_privileges_for_list (THD *thd, const mem_root_deque< Item * > &items, Access_bitmask privileges) |
| Check privileges for column references in an item list. More...
|
|
void | calc_used_field_length (TABLE *table, bool needs_rowid, uint *p_used_fieldlength) |
| Find how much space the previous read not const tables takes in cache. More...
|
|
void | calc_length_and_keyparts (Key_use *keyuse, JOIN_TAB *tab, const uint key, table_map used_tables, Key_use **chosen_keyuses, uint *length_out, uint *keyparts_out, table_map *dep_map, bool *maybe_null) |
| Calculate properties of ref key: key length, number of used key parts, dependency map, possibility of null. More...
|
|
bool | init_ref (THD *thd, unsigned keyparts, unsigned length, unsigned keyno, Index_lookup *ref) |
| Initialize the given TABLE_REF; setting basic fields and allocating memory for arrays. More...
|
|
bool | init_ref_part (THD *thd, unsigned part_no, Item *val, bool *cond_guard, bool null_rejecting, table_map const_tables, table_map used_tables, bool nullable, const KEY_PART_INFO *key_part_info, uchar *key_buff, Index_lookup *ref) |
| Initialize a given keypart in the table ref. More...
|
|
bool | create_ref_for_key (JOIN *join, JOIN_TAB *j, Key_use *org_keyuse, table_map used_tables) |
| Setup a ref access for looking up rows via an index (a key). More...
|
|
static store_key::store_key_result | type_conversion_status_to_store_key (THD *thd, type_conversion_status ts) |
|
bool | and_conditions (Item **e1, Item *e2) |
| Extend e1 by AND'ing e2 to the condition e1 points to. More...
|
|
static Item * | make_cond_for_index (Item *cond, TABLE *table, uint keyno, bool other_tbls_ok) |
|
static Item * | make_cond_remainder (Item *cond, bool exclude_index) |
|
bool | make_join_readinfo (JOIN *join, uint no_jbuf_after) |
| Plan refinement stage: do various setup things for the executor. More...
|
|
static void | cleanup_table (TABLE *table) |
|
ORDER * | simple_remove_const (ORDER *order, Item *where) |
| Filter out ORDER BY items that are equal to constants in WHERE condition. More...
|
|
bool | equality_determines_uniqueness (const Item_func_comparison *func, const Item *v, const Item *c) |
| Check if equality can be used to remove sub-clause of GROUP BY/ORDER BY. More...
|
|
bool | equality_has_no_implicit_casts (const Item_func_comparison *func, const Item *item1, const Item *item2) |
| Check whether equality between two items is exact, ie., there are no implicit casts involved. More...
|
|
static bool | equal (const Item *i1, const Item *i2, const Field *f2) |
|
bool | check_field_is_const (Item *cond, const Item *order_item, const Field *order_field, Item **const_item) |
| Check if a field is equal to a constant value in a condition. More...
|
|
void | count_field_types (const Query_block *query_block, Temp_table_param *param, const mem_root_deque< Item * > &fields, bool reset_with_sum_func, bool save_sum_fields) |
| Update TMP_TABLE_PARAM with count of the different type of fields. More...
|
|
bool | test_if_subpart (ORDER *a, ORDER *b) |
| Return 1 if second is a subpart of first argument. More...
|
|
void | calc_group_buffer (JOIN *join, ORDER *group) |
| calc how big buffer we need for comparing group entries. More...
|
|
void | free_underlaid_joins (Query_block *select) |
| Free joins of subselect of this select. More...
|
|
bool | CreateFramebufferTable (THD *thd, const Temp_table_param &tmp_table_param, const Query_block &query_block, const mem_root_deque< Item * > &source_fields, const mem_root_deque< Item * > &window_output_fields, Func_ptr_array *mapping_from_source_to_window_output, Window *window) |
|
bool | test_if_cheaper_ordering (const JOIN_TAB *tab, ORDER_with_src *order, TABLE *table, Key_map usable_keys, int ref_key, ha_rows select_limit, int *new_key, int *new_key_direction, ha_rows *new_select_limit, uint *new_used_key_parts, uint *saved_best_key_parts, double *new_read_time) |
| Find a cheaper access key than a given key. More...
|
|
uint | get_index_for_order (ORDER_with_src *order, TABLE *table, ha_rows limit, AccessPath *range_scan, bool *need_sort, bool *reverse) |
| Find a key to apply single table UPDATE/DELETE by a given ORDER. More...
|
|
uint | actual_key_parts (const KEY *key_info) |
| Returns number of key parts depending on OPTIMIZER_SWITCH_USE_INDEX_EXTENSIONS flag. More...
|
|
uint | actual_key_flags (const KEY *key_info) |
| Returns key flags depending on OPTIMIZER_SWITCH_USE_INDEX_EXTENSIONS flag. More...
|
|
join_type | calc_join_type (AccessPath *path) |
|
Evaluate query expressions, throughout resolving, optimization and execution.