My Project
Classes | Defines | Functions
sql_select.cc File Reference

mysql_select and join optimization More...

#include "sql_priv.h"
#include "sql_select.h"
#include "sql_table.h"
#include "sql_derived.h"
#include "probes_mysql.h"
#include "opt_trace.h"
#include "key.h"
#include "lock.h"
#include "sql_show.h"
#include "sql_base.h"
#include "sql_acl.h"
#include "sql_test.h"
#include "records.h"
#include "filesort.h"
#include "sql_union.h"
#include "opt_explain.h"
#include "sql_join_buffer.h"
#include "sql_optimizer.h"
#include "sql_tmp_table.h"
#include <algorithm>

Classes

class  Plan_change_watchdog

Defines

#define ICP_COND_USES_INDEX_ONLY   10

Functions

bool const_expression_in_where (Item *conds, Item *item, Item **comp_item)
uint find_shortest_key (TABLE *table, const key_map *usable_keys)
bool handle_select (THD *thd, select_result *result, ulong setup_tables_done_option)
bool types_allow_materialization (Item *outer, Item *inner)
 Check if two items are compatible wrt. materialization.
bool mysql_select (THD *thd, TABLE_LIST *tables, uint wild_num, List< Item > &fields, Item *conds, SQL_I_List< ORDER > *order, SQL_I_List< ORDER > *group, Item *having, ulonglong select_options, select_result *result, SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex)
void calc_used_field_length (THD *thd, JOIN_TAB *join_tab)
bool create_ref_for_key (JOIN *join, JOIN_TAB *j, Key_use *org_keyuse, table_map used_tables)
bool and_conditions (Item **e1, Item *e2)
bool make_join_readinfo (JOIN *join, ulonglong options, uint no_jbuf_after)
bool error_if_full_join (JOIN *join)
ORDERsimple_remove_const (ORDER *order, Item *where)
bool const_expression_in_where (Item *cond, Item *comp_item, Field *comp_field, Item **const_item)
int test_if_order_by_key (ORDER *order, TABLE *table, uint idx, uint *used_key_parts)
bool is_subkey (KEY_PART_INFO *key_part, KEY_PART_INFO *ref_key_part, KEY_PART_INFO *ref_key_part_end)
bool is_ref_or_null_optimized (const JOIN_TAB *tab, uint ref_key)
bool test_if_skip_sort_order (JOIN_TAB *tab, ORDER *order, ha_rows select_limit, const bool no_changes, const key_map *map, const char *clause_type)
void count_field_types (SELECT_LEX *select_lex, TMP_TABLE_PARAM *param, List< Item > &fields, bool reset_with_sum_func)
bool test_if_subpart (ORDER *a, ORDER *b)
void calc_group_buffer (JOIN *join, ORDER *group)
void free_underlaid_joins (THD *thd, SELECT_LEX *select)
uint get_index_for_order (ORDER *order, TABLE *table, SQL_SELECT *select, ha_rows limit, bool *need_sort, bool *reverse)
uint actual_key_parts (KEY *key_info)
uint actual_key_flags (KEY *key_info)

Detailed Description

mysql_select and join optimization

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines