MySQL 9.1.0
Source Code Documentation
Key_field Struct Reference

A Key_field is a descriptor of a predicate of the form (column <op> val). More...

#include <sql_optimizer_internal.h>

Public Member Functions

 Key_field (Item_field *item_field, Item *val, uint level, uint optimize, bool eq_func, bool null_rejecting, bool *cond_guard, uint sj_pred_no)
 

Public Attributes

Item_fielditem_field
 Item representing the column. More...
 
Itemval
 May be empty if diff constant. More...
 
uint level
 
uint optimize
 KEY_OPTIMIZE_*. More...
 
bool eq_func
 
bool null_rejecting
 If true, the condition this struct represents will not be satisfied when val IS NULL. More...
 
bool * cond_guard
 
uint sj_pred_no
 

Detailed Description

A Key_field is a descriptor of a predicate of the form (column <op> val).

Currently 'op' is one of {'=', '<=>', 'IS [NOT] NULL', 'arg1 IN arg2'}, and 'val' can be either another column or an expression (including constants).

Key_field's are used to analyze columns that may potentially serve as parts of keys for index lookup. If 'field' is part of an index, then add_key_part() creates a corresponding Key_use object and inserts it into the JOIN::keyuse_array which is passed by update_ref_and_keys().

The structure is used only during analysis of the candidate columns for index 'ref' access.


The documentation for this struct was generated from the following file: