2058
2058
int save_in_field(Field *field, bool no_conversions);
2061
class Item_cache_row: public Item_cache
2063
Item_cache **values;
2064
uint32_t item_count;
2068
:Item_cache(), values(0), item_count(2), save_array(0) {}
2071
'allocate' used only in row transformer, to preallocate space for row
2074
bool allocate(uint32_t num);
2076
'setup' is needed only by row => it not called by simple row subselect
2077
(only by IN subselect (in subselect optimizer))
2079
bool setup(Item *item);
2080
void store(Item *item);
2081
void illegal_method_call(const char *);
2082
void make_field(Send_field *)
2084
illegal_method_call((const char*)"make_field");
2088
illegal_method_call((const char*)"val");
2093
illegal_method_call((const char*)"val_int");
2096
String *val_str(String *)
2098
illegal_method_call((const char*)"val_str");
2101
my_decimal *val_decimal(my_decimal *val __attribute__((unused)))
2103
illegal_method_call((const char*)"val_decimal");
2107
enum Item_result result_type() const { return ROW_RESULT; }
2109
uint32_t cols() { return item_count; }
2110
Item *element_index(uint32_t i) { return values[i]; }
2111
Item **addr(uint32_t i) { return (Item **) (values + i); }
2112
bool check_cols(uint32_t c);
2115
void keep_array() { save_array= 1; }
2118
Item_cache::cleanup();
2120
memset(values, 0, item_count*sizeof(Item**));
2129
Item_type_holder used to store type. name, length of Item for UNIONS &
2132
Item_type_holder do not need cleanup() because its time of live limited by
2133
single SP/PS execution.
2135
class Item_type_holder: public Item
2138
TYPELIB *enum_set_typelib;
2139
enum_field_types fld_type;
2141
void get_full_info(Item *item);
2143
/* It is used to count decimal precision in join_types */
2144
int prev_decimal_int_part;
2146
Item_type_holder(Session*, Item*);
2148
Item_result result_type() const;
2149
enum_field_types field_type() const { return fld_type; };
2150
enum Type type() const { return TYPE_HOLDER; }
2153
my_decimal *val_decimal(my_decimal *);
2154
String *val_str(String*);
2155
bool join_types(Session *session, Item *);
2156
Field *make_field_by_type(Table *table);
2157
static uint32_t display_length(Item *item);
2158
static enum_field_types get_real_type(Item *);
2162
2062
class st_select_lex;
2163
2063
void mark_select_range_as_dependent(Session *session,