34 table_map used_table_map;
42 enum enum_field_types cached_field_type;
45 example(0), used_table_map(0), cached_field(0), cached_field_type(DRIZZLE_TYPE_VARCHAR)
50 Item_cache(enum_field_types field_type_arg):
51 example(0), used_table_map(0), cached_field(0), cached_field_type(field_type_arg)
57 void set_used_tables(table_map map) { used_table_map= map; }
59 virtual void allocate(uint32_t) {};
60 virtual bool setup(
Item *item)
63 max_length= item->max_length;
64 decimals= item->decimals;
65 collation.set(item->collation);
66 unsigned_flag= item->unsigned_flag;
67 if (item->type() == FIELD_ITEM)
71 virtual void store(
Item *)= 0;
72 enum Type type()
const {
return CACHE_ITEM; }
73 enum_field_types field_type()
const {
return cached_field_type; }
74 static Item_cache* get_cache(
const Item *item);
76 virtual void keep_array() {}
77 virtual void print(String *str);
78 bool eq_def(Field *field);
79 bool eq(
const Item *item,
bool)
const
85 return test(example && example->basic_const_item());