My Project
Public Member Functions | Public Attributes
Item_func_in Class Reference
Inheritance diagram for Item_func_in:
Item_func_opt_neg Item_int_func Item_func Item_result_field Item

List of all members.

Public Member Functions

 Item_func_in (List< Item > &list)
longlong val_int ()
bool fix_fields (THD *, Item **)
void fix_after_pullout (st_select_lex *parent_select, st_select_lex *removed_select)
void fix_length_and_dec ()
uint decimal_precision () const
void cleanup ()
optimize_type select_optimize () const
virtual void print (String *str, enum_query_type query_type)
enum Functype functype () const
const char * func_name () const
bool nulls_in_row ()
bool is_bool_func ()
const CHARSET_INFO * compare_collation ()

Public Attributes

in_vectorarray
bool have_null
bool arg_types_compatible
Item_result left_result_type
cmp_itemcmp_items [6]
DTCollation cmp_collation

Member Function Documentation

void Item_func_in::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.

Parameters:
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_in::fix_fields ( THD *  thd,
Item **  ref 
) [virtual]

Perform context analysis of an IN item tree.

This function performs context analysis (name resolution) and calculates various attributes of the item tree with Item_func_in 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.

Parameters:
thdreference to the global context of the query thread
refpointer to Item* variable where pointer to resulting "fixed" item is to be assigned
Note:
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(e IN(e1,...,en))     = union(T1(e),intersection(T1(ei)))
      T1(e IN(e1,...,en))     = union(T1(e),intersection(T1(ei)))
      T0(e NOT IN(e1,...,en)) = union(T1(e),union(T1(ei)))
      T1(e NOT IN(e1,...,en)) = union(T1(e),intersection(T1(ei)))
    
Return values:
0ok
1got error

Reimplemented from Item_func.

void Item_func_in::print ( String str,
enum_query_type  query_type 
) [virtual]

This method is used for to:

  • to generate a view definition query (SELECT-statement);
  • to generate a SQL-query for EXPLAIN EXTENDED;
  • to generate a SQL-query to be shown in INFORMATION_SCHEMA;
  • debug.

For more information about view definition query, INFORMATION_SCHEMA query and why they should be generated from the Item-tree,

See also:
mysql_register_view().

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