#include <item.h>
Inheritance diagram for Item_name_const:


Public Member Functions | |
| Item_name_const (Item *name, Item *val) | |
| bool | check_partition_func_processor (byte *bool_arg) |
| bool | fix_fields (THD *, Item **) |
| enum Type | type () const |
| double | val_real () |
| longlong | val_int () |
| String * | val_str (String *sp) |
| my_decimal * | val_decimal (my_decimal *) |
| bool | is_null () |
| void | print (String *str) |
| Item_result | result_type () const |
| bool | const_item () const |
| int | save_in_field (Field *field, bool no_conversions) |
| bool | send (Protocol *protocol, String *str) |
Private Attributes | |
| Item * | value_item |
| Item * | name_item |
Definition at line 1100 of file item.h.
Definition at line 1105 of file item.h.
References Item::maybe_null, and TRUE.
01105 : value_item(val), name_item(name) 01106 { 01107 Item::maybe_null= TRUE; 01108 }
| bool Item_name_const::const_item | ( | ) | const [inline, virtual] |
Reimplemented from Item.
Definition at line 1099 of file item.cc.
References buf, Item::const_item(), Item::decimals, FALSE, Item::fix_fields(), fix_fields(), Item::fixed, String::length(), Item::max_length, my_charset_bin, name_item, String::ptr(), Item::set_name(), system_charset_info, TRUE, Item::val_str(), and value_item.
Referenced by fix_fields().
01100 { 01101 char buf[128]; 01102 String *item_name; 01103 String s(buf, sizeof(buf), &my_charset_bin); 01104 s.length(0); 01105 01106 if (value_item->fix_fields(thd, &value_item) || 01107 name_item->fix_fields(thd, &name_item)) 01108 return TRUE; 01109 if (!(value_item->const_item() && name_item->const_item())) 01110 return TRUE; 01111 01112 if (!(item_name= name_item->val_str(&s))) 01113 return TRUE; /* Can't have a NULL name */ 01114 01115 set_name(item_name->ptr(), (uint) item_name->length(), system_charset_info); 01116 max_length= value_item->max_length; 01117 decimals= value_item->decimals; 01118 fixed= 1; 01119 return FALSE; 01120 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool Item_name_const::is_null | ( | ) | [virtual] |
Reimplemented from Item.
Definition at line 1088 of file item.cc.
References Item::is_null(), is_null(), and value_item.
Referenced by is_null().
01089 { 01090 return value_item->is_null(); 01091 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void Item_name_const::print | ( | String * | str | ) | [virtual] |
Reimplemented from Item.
Definition at line 1123 of file item.cc.
References String::append(), name_item, Item::print(), STRING_WITH_LEN, and value_item.
01124 { 01125 str->append(STRING_WITH_LEN("NAME_CONST(")); 01126 name_item->print(str); 01127 str->append(','); 01128 value_item->print(str); 01129 str->append(')'); 01130 }
Here is the call graph for this function:

| Item_result Item_name_const::result_type | ( | ) | const [inline, virtual] |
Reimplemented from Item.
Definition at line 1121 of file item.h.
References Item::result_type(), and value_item.
01122 { 01123 return value_item->result_type(); 01124 }
Here is the call graph for this function:

Reimplemented from Item.
Definition at line 1131 of file item.h.
References Item::save_in_field(), and value_item.
01132 { 01133 return value_item->save_in_field(field, no_conversions); 01134 }
Here is the call graph for this function:

Reimplemented from Item.
Definition at line 1136 of file item.h.
References Item::send(), and value_item.
01137 { 01138 return value_item->send(protocol, str); 01139 }
Here is the call graph for this function:

| Item::Type Item_name_const::type | ( | ) | const [virtual] |
Implements Item.
Definition at line 1093 of file item.cc.
References Item::type(), type(), and value_item.
Referenced by type().
01094 { 01095 return value_item->type(); 01096 }
Here is the call graph for this function:

Here is the caller graph for this function:

| my_decimal * Item_name_const::val_decimal | ( | my_decimal * | ) | [virtual] |
Implements Item.
Definition at line 1079 of file item.cc.
References DBUG_ASSERT, Item::fixed, Item::null_value, Item::val_decimal(), val_decimal(), and value_item.
Referenced by val_decimal().
01080 { 01081 DBUG_ASSERT(fixed); 01082 my_decimal *val= value_item->val_decimal(decimal_value); 01083 null_value= value_item->null_value; 01084 return val; 01085 }
Here is the call graph for this function:

Here is the caller graph for this function:

| longlong Item_name_const::val_int | ( | ) | [virtual] |
Implements Item.
Definition at line 1061 of file item.cc.
References DBUG_ASSERT, Item::fixed, Item::null_value, Item::val_int(), val_int(), and value_item.
Referenced by val_int().
01062 { 01063 DBUG_ASSERT(fixed); 01064 longlong ret= value_item->val_int(); 01065 null_value= value_item->null_value; 01066 return ret; 01067 }
Here is the call graph for this function:

Here is the caller graph for this function:

| double Item_name_const::val_real | ( | ) | [virtual] |
Implements Item.
Definition at line 1052 of file item.cc.
References DBUG_ASSERT, Item::fixed, Item::null_value, Item::val_real(), val_real(), and value_item.
Referenced by val_real().
01053 { 01054 DBUG_ASSERT(fixed); 01055 double ret= value_item->val_real(); 01056 null_value= value_item->null_value; 01057 return ret; 01058 }
Here is the call graph for this function:

Here is the caller graph for this function:

Implements Item.
Definition at line 1070 of file item.cc.
References DBUG_ASSERT, Item::fixed, Item::null_value, Item::val_str(), val_str(), and value_item.
Referenced by val_str().
01071 { 01072 DBUG_ASSERT(fixed); 01073 String *ret= value_item->val_str(sp); 01074 null_value= value_item->null_value; 01075 return ret; 01076 }
Here is the call graph for this function:

Here is the caller graph for this function:

Item* Item_name_const::name_item [private] |
Item* Item_name_const::value_item [private] |
Definition at line 1102 of file item.h.
Referenced by fix_fields(), is_null(), print(), result_type(), save_in_field(), send(), type(), val_decimal(), val_int(), val_real(), and val_str().
1.4.7

