| My Project
   
    | 
classes to use when handling where clause More...
#include "procedure.h"#include <myisam.h>#include "sql_array.h"#include "records.h"#include "opt_range.h"#include "filesort.h"#include "mem_root_array.h"#include "sql_executor.h"#include "opt_explain_format.h"#include <functional>Go to the source code of this file.
| Classes | |
| class | Key_use | 
| struct | st_table_ref | 
| struct | st_position | 
| struct | st_join_table | 
| class | Join_tab_compare_default | 
| class | Join_tab_compare_straight | 
| class | Join_tab_compare_embedded_first | 
| struct | st_select_check | 
| class | store_key | 
| class | store_key_field | 
| class | store_key_item | 
| class | store_key_const_item | 
| Defines | |
| #define | LOWER_BITS(type, A) ((type) (((type) 1 << (A)) -1)) | 
| #define | KEY_OPTIMIZE_EXISTS 1 | 
| #define | KEY_OPTIMIZE_REF_OR_NULL 2 | 
| #define | FT_KEYPART (MAX_REF_PARTS+10) | 
| #define | TAB_INFO_HAVE_VALUE 1 | 
| #define | TAB_INFO_USING_INDEX 2 | 
| #define | TAB_INFO_USING_WHERE 4 | 
| #define | TAB_INFO_FULL_SCAN_ON_NULL 8 | 
| #define | SJ_OPT_NONE 0 | 
| #define | SJ_OPT_DUPS_WEEDOUT 1 | 
| #define | SJ_OPT_LOOSE_SCAN 2 | 
| #define | SJ_OPT_FIRST_MATCH 3 | 
| #define | SJ_OPT_MATERIALIZE_LOOKUP 4 | 
| #define | SJ_OPT_MATERIALIZE_SCAN 5 | 
| Typedefs | |
| typedef Mem_root_array < Key_use, true > | Key_use_array | 
| typedef st_table_ref | TABLE_REF | 
| typedef st_position | POSITION | 
| typedef st_join_table | JOIN_TAB | 
| typedef Bounds_checked_array < Item_null_result * > | Item_null_array | 
| typedef struct st_select_check | SELECT_CHECK | 
| Enumerations | |
| enum | join_type { JT_UNKNOWN, JT_SYSTEM, JT_CONST, JT_EQ_REF, JT_REF, JT_ALL, JT_RANGE, JT_INDEX_SCAN, JT_FT, JT_REF_OR_NULL, JT_UNIQUE_SUBQUERY, JT_INDEX_SUBQUERY, JT_INDEX_MERGE } | 
| enum | quick_type { QS_NONE, QS_RANGE, QS_DYNAMIC_RANGE } | 
| Functions | |
| bool | sj_is_materialize_strategy (uint strategy) | 
| void | count_field_types (SELECT_LEX *select_lex, TMP_TABLE_PARAM *param, List< Item > &fields, bool reset_with_sum_func) | 
| uint | find_shortest_key (TABLE *table, const key_map *usable_keys) | 
| bool | simple_pred (Item_func *func_item, Item **args, bool *inv_order) | 
| int | opt_sum_query (THD *thd, TABLE_LIST *tables, List< Item > &all_fields, Item *conds) | 
| int | refpos_order_cmp (const void *arg, const void *a, const void *b) | 
| bool | error_if_full_join (JOIN *join) | 
| bool | handle_select (THD *thd, select_result *result, ulong setup_tables_done_option) | 
| bool | mysql_select (THD *thd, TABLE_LIST *tables, uint wild_num, List< Item > &list, Item *conds, SQL_I_List< ORDER > *order, SQL_I_List< ORDER > *group, Item *having, ulonglong select_type, select_result *result, SELECT_LEX_UNIT *unit, SELECT_LEX *select_lex) | 
| void | free_underlaid_joins (THD *thd, SELECT_LEX *select) | 
| void | calc_used_field_length (THD *thd, JOIN_TAB *join_tab) | 
| bool | optimizer_flag (THD *thd, uint flag) | 
| uint | get_index_for_order (ORDER *order, TABLE *table, SQL_SELECT *select, ha_rows limit, bool *need_sort, bool *reverse) | 
| ORDER * | simple_remove_const (ORDER *order, Item *where) | 
| bool | const_expression_in_where (Item *cond, Item *comp_item, Field *comp_field=NULL, Item **const_item=NULL) | 
| bool | test_if_subpart (ORDER *a, ORDER *b) | 
| void | calc_group_buffer (JOIN *join, ORDER *group) | 
| 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) | 
| bool | make_join_readinfo (JOIN *join, ulonglong options, uint no_jbuf_after) | 
| bool | create_ref_for_key (JOIN *join, JOIN_TAB *j, Key_use *org_keyuse, table_map used_tables) | 
| bool | types_allow_materialization (Item *outer, Item *inner) | 
| Check if two items are compatible wrt. materialization. | |
| bool | and_conditions (Item **e1, Item *e2) | 
| uint | actual_key_parts (KEY *key_info) | 
| uint | actual_key_flags (KEY *key_info) | 
| int | test_if_order_by_key (ORDER *order, TABLE *table, uint idx, uint *used_key_parts=NULL) | 
classes to use when handling where clause
| #define LOWER_BITS | ( | type, | |
| A | |||
| ) | ((type) (((type) 1 << (A)) -1)) | 
Returns a constant of type 'type' with the 'A' lowest-weight bits set. Example: LOWER_BITS(uint, 3) == 7. Requirement: A < sizeof(type) * 8.
| typedef st_position POSITION | 
A position of table within a join order. This structure is primarily used as a part of join->positions and join->best_positions arrays.
One POSITION element contains information about:
This class has to stay a POD, because it is memcpy'd in many places.
| enum quick_type | 
Bits describing quick select type
| int opt_sum_query | ( | THD * | thd, | 
| TABLE_LIST * | tables, | ||
| List< Item > & | all_fields, | ||
| Item * | conds | ||
| ) | 
Substitutes constants for some COUNT(), MIN() and MAX() functions.
| thd | thread handler | 
| tables | list of leaves of join table tree | 
| all_fields | All fields to be returned | 
| conds | WHERE clause | 
| 0 | no errors | 
| 1 | if all items were resolved | 
| HA_ERR_KEY_NOT_FOUND | on impossible conditions | 
| HA_ERR_... | if a deadlock or a lock wait timeout happens, for example | 
| ER_... | e.g. ER_SUBQUERY_NO_1_ROW | 
| bool simple_pred | ( | Item_func * | func_item, | 
| Item ** | args, | ||
| bool * | inv_order | ||
| ) | 
Test if the predicate compares a field with constants.
| func_item | Predicate item | |
| [out] | args | Here we store the field followed by constants | 
| [out] | inv_order | Is set to 1 if the predicate is of the form 'const op field' | 
| 0 | func_item is a simple predicate: a field is compared with constants | 
| 1 | Otherwise | 
 1.7.6.1
 1.7.6.1