MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Arg_comparator Class Reference
Inheritance diagram for Arg_comparator:
Collaboration diagram for Arg_comparator:

Public Member Functions

 Arg_comparator (Item **a1, Item **a2)
int set_compare_func (Item_result_field *owner, Item_result type)
int set_compare_func (Item_result_field *owner_arg)
int set_cmp_func (Item_result_field *owner_arg, Item **a1, Item **a2, Item_result type)
int set_cmp_func (Item_result_field *owner_arg, Item **a1, Item **a2, bool set_null_arg)
int compare ()
int compare_string ()
int compare_binary_string ()
int compare_real ()
int compare_decimal ()
int compare_int_signed ()
int compare_int_signed_unsigned ()
int compare_int_unsigned_signed ()
int compare_int_unsigned ()
int compare_time_packed ()
int compare_e_time_packed ()
int compare_row ()
int compare_e_string ()
int compare_e_binary_string ()
int compare_e_real ()
int compare_e_decimal ()
int compare_e_int ()
int compare_e_int_diff_signedness ()
int compare_e_row ()
int compare_real_fixed ()
int compare_e_real_fixed ()
int compare_datetime ()
Item ** cache_converted_constant (THD *thd, Item **value, Item **cache, Item_result type)
void set_datetime_cmp_func (Item_result_field *owner_arg, Item **a1, Item **b1)
bool is_owner_equal_func ()
void cleanup ()
void set_cmp_context_for_datetime ()

Static Public Member Functions

static bool can_compare_as_dates (Item *a, Item *b, ulonglong *const_val_arg)
- Static Public Member Functions inherited from Sql_alloc
static void * operator new (size_t size) throw ()
static void * operator new[] (size_t size) throw ()
static void * operator new[] (size_t size, MEM_ROOT *mem_root) throw ()
static void * operator new (size_t size, MEM_ROOT *mem_root) throw ()
static void operator delete (void *ptr, size_t size)
static void operator delete (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, size_t size)

Public Attributes

DTCollation cmp_collation
String value1
String value2

Static Public Attributes

static arg_cmp_func comparator_matrix [5][2]

Friends

class Item_func

Detailed Description

Definition at line 34 of file item_cmpfunc.h.

Member Function Documentation

Item ** Arg_comparator::cache_converted_constant ( THD *  thd_arg,
Item **  value,
Item **  cache_item,
Item_result  type 
)

Convert and cache a constant.

Parameters
value[in] An item to cache
cache_item[out] Placeholder for the cache item
type[in] Comparison type

When given item is a constant and its type differs from comparison type then cache its value to avoid type conversion of this constant on each evaluation. In this case the value is cached and the reference to the cache is returned. Original value is returned otherwise.

Returns
cache item or original value.

Definition at line 1122 of file item_cmpfunc.cc.

int Arg_comparator::compare_binary_string ( )

Compare strings byte by byte. End spaces are also compared.

Return values
<0*a < *b
0*b == *b
>0*a > *b

Definition at line 1396 of file item_cmpfunc.cc.

int Arg_comparator::compare_e_int_diff_signedness ( )

Compare unsigned *a with signed *b or signed *a with unsigned *b.

Definition at line 1718 of file item_cmpfunc.cc.

int Arg_comparator::compare_e_string ( )

Compare strings, but take into account that NULL == NULL.

Definition at line 1422 of file item_cmpfunc.cc.

int Arg_comparator::compare_e_time_packed ( )

Compare arguments using numeric packed representation for '<=>'.

Definition at line 1614 of file item_cmpfunc.cc.

int Arg_comparator::compare_int_signed_unsigned ( )

Compare signed (*a) with unsigned (*B)

Definition at line 1654 of file item_cmpfunc.cc.

int Arg_comparator::compare_int_unsigned ( )

Compare values as BIGINT UNSIGNED.

Definition at line 1629 of file item_cmpfunc.cc.

int Arg_comparator::compare_int_unsigned_signed ( )

Compare unsigned (*a) with signed (*B)

Definition at line 1681 of file item_cmpfunc.cc.

int Arg_comparator::compare_time_packed ( )

Compare arguments using numeric packed temporal representation.

Definition at line 1573 of file item_cmpfunc.cc.

Member Data Documentation

arg_cmp_func Arg_comparator::comparator_matrix
static
Initial value:
{{&Arg_comparator::compare_string, &Arg_comparator::compare_e_string},
{&Arg_comparator::compare_real, &Arg_comparator::compare_e_real},
{&Arg_comparator::compare_int_signed, &Arg_comparator::compare_e_int},
{&Arg_comparator::compare_row, &Arg_comparator::compare_e_row},
{&Arg_comparator::compare_decimal, &Arg_comparator::compare_e_decimal}}

Definition at line 113 of file item_cmpfunc.h.


The documentation for this class was generated from the following files: