My Project
Public Member Functions
Item_func_if Class Reference
Inheritance diagram for Item_func_if:
Item_func Item_result_field Item

List of all members.

Public Member Functions

 Item_func_if (Item *a, Item *b, Item *c)
double val_real ()
longlong val_int ()
Stringval_str (String *str)
my_decimalval_decimal (my_decimal *)
bool get_date (MYSQL_TIME *ltime, uint fuzzydate)
bool get_time (MYSQL_TIME *ltime)
enum Item_result result_type () const
enum_field_types field_type () const
bool fix_fields (THD *, Item **)
void fix_length_and_dec ()
void fix_after_pullout (st_select_lex *parent_select, st_select_lex *removed_select)
uint decimal_precision () const
const char * func_name () const

Member Function Documentation

void Item_func_if::fix_after_pullout ( st_select_lex *  parent_select,
st_select_lex *  removed_select 
) [virtual]

Fix after tables have been moved from one select_lex level to the parent level, e.g by semijoin conversion. Basically re-calculate all attributes dependent on the tables.

parent_selectselect_lex that tables are moved to.
removed_selectselect_lex that tables are moved away from, child of parent_select.

Reimplemented from Item_func.

bool Item_func_if::fix_fields ( THD *  thd,
Item **  ref 
) [virtual]

Perform context analysis of an IF item tree.

This function performs context analysis (name resolution) and calculates various attributes of the item tree with Item_func_if as its root. The function saves in ref the pointer to the item or to a newly created item that is considered as a replacement for the original one.

thdreference to the global context of the query thread
refpointer to Item* variable where pointer to resulting "fixed" item is to be assigned
Let T0(e)/T1(e) be the value of not_null_tables(e) when e is used on a predicate/function level. Then it's easy to show that:
      T0(IF(e,e1,e2)  = T1(IF(e,e1,e2))
      T1(IF(e,e1,e2)) = intersection(T1(e1),T1(e2))
Return values:
1got error

Reimplemented from Item_func.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines