592
class Item_basic_constant :public Item
595
/* to prevent drop fixed flag (no need parent cleanup call) */
599
Restore the original field name as it might not have been allocated
600
in the statement memory. If the name is auto generated, it must be
601
done again between subsequent executions of a prepared statement.
609
class Item_num: public Item_basic_constant
612
Item_num() {} /* Remove gcc warning */
613
virtual Item_num *neg()= 0;
614
Item *safe_charset_converter(const CHARSET_INFO * const tocs);
617
class Item_ident :public Item
621
We have to store initial values of db_name, table_name and field_name
622
to be able to restore them during cleanup() because they can be
623
updated during fix_fields() to values from Field object and life-time
624
of those is shorter than life-time of Item_field.
626
const char *orig_db_name;
627
const char *orig_table_name;
628
const char *orig_field_name;
631
Name_resolution_context *context;
633
const char *table_name;
634
const char *field_name;
635
bool alias_name_used; /* true if item was resolved against alias */
637
Cached value of index for this field in table->field array, used by prep.
638
stmts for speeding up their re-execution. Holds NO_CACHED_FIELD_INDEX
639
if index value is not known.
641
uint32_t cached_field_index;
643
Cached pointer to table which contains this field, used for the same reason
644
by prep. stmt. too in case then we have not-fully qualified field.
645
0 - means no cached value.
647
TableList *cached_table;
648
st_select_lex *depended_from;
649
Item_ident(Name_resolution_context *context_arg,
650
const char *db_name_arg, const char *table_name_arg,
651
const char *field_name_arg);
652
Item_ident(Session *session, Item_ident *item);
653
const char *full_name() const;
655
bool remove_dependence_processor(unsigned char * arg);
656
virtual void print(String *str, enum_query_type query_type);
657
virtual bool change_context_processor(unsigned char *cntx)
658
{ context= (Name_resolution_context *)cntx; return false; }
659
friend bool insert_fields(Session *session, Name_resolution_context *context,
661
const char *table_name, List_iterator<Item> *it,
662
bool any_privileges);
666
class Item_ident_for_show :public Item
671
const char *table_name;
673
Item_ident_for_show(Field *par_field, const char *db_arg,
674
const char *table_name_arg)
675
:field(par_field), db_name(db_arg), table_name(table_name_arg)
678
enum Type type() const { return FIELD_ITEM; }
681
String *val_str(String *str);
682
my_decimal *val_decimal(my_decimal *dec);
683
void make_field(Send_field *tmp_field);
687
class Item_field :public Item_ident
690
void set_field(Field *field);
692
Field *field,*result_field;
693
Item_equal *item_equal;
696
if any_privileges set to true then here real effective privileges will
699
uint32_t have_privileges;
700
/* field need any privileges (for VIEW creation) */
702
Item_field(Name_resolution_context *context_arg,
703
const char *db_arg,const char *table_name_arg,
704
const char *field_name_arg);
706
Constructor needed to process subselect with temporary tables (see Item)
708
Item_field(Session *session, Item_field *item);
710
Constructor used inside setup_wild(), ensures that field, table,
711
and database names will live as long as Item_field (this is important
712
in prepared statements).
714
Item_field(Session *session, Name_resolution_context *context_arg, Field *field);
716
If this constructor is used, fix_fields() won't work, because
717
db_name, table_name and column_name are unknown. It's necessary to call
718
reset_field() before fix_fields() for all fields created this way.
720
Item_field(Field *field);
721
enum Type type() const { return FIELD_ITEM; }
722
bool eq(const Item *item, bool binary_cmp) const;
725
my_decimal *val_decimal(my_decimal *);
726
String *val_str(String*);
728
int64_t val_int_result();
729
String *str_result(String* tmp);
730
my_decimal *val_decimal_result(my_decimal *);
731
bool val_bool_result();
732
bool send(Protocol *protocol, String *str_arg);
733
void reset_field(Field *f);
734
bool fix_fields(Session *, Item **);
735
void fix_after_pullout(st_select_lex *new_parent, Item **ref);
736
void make_field(Send_field *tmp_field);
737
int save_in_field(Field *field,bool no_conversions);
738
void save_org_in_field(Field *field);
739
table_map used_tables() const;
740
enum Item_result result_type () const;
741
Item_result cast_to_int_type() const;
742
enum_field_types field_type() const;
743
enum_monotonicity_info get_monotonicity_info() const
745
return MONOTONIC_STRICT_INCREASING;
747
int64_t val_int_endpoint(bool left_endp, bool *incl_endp);
748
Field *get_tmp_table_field() { return result_field; }
749
Field *tmp_table_field(Table *) { return result_field; }
750
bool get_date(DRIZZLE_TIME *ltime,uint32_t fuzzydate);
751
bool get_date_result(DRIZZLE_TIME *ltime,uint32_t fuzzydate);
752
bool get_time(DRIZZLE_TIME *ltime);
754
void update_null_value();
755
Item *get_tmp_table_item(Session *session);
756
bool collect_item_field_processor(unsigned char * arg);
757
bool find_item_in_field_list_processor(unsigned char *arg);
758
bool register_field_in_read_map(unsigned char *arg);
759
bool register_field_in_bitmap(unsigned char *arg);
760
bool check_vcol_func_processor(unsigned char *)
763
bool result_as_int64_t();
764
Item_equal *find_item_equal(COND_EQUAL *cond_equal);
765
bool subst_argument_checker(unsigned char **arg);
766
Item *equal_fields_propagator(unsigned char *arg);
767
bool set_no_const_sub(unsigned char *arg);
768
Item *replace_equal_field(unsigned char *arg);
769
uint32_t max_disp_length();
770
Item_field *filed_for_view_update() { return this; }
771
Item *safe_charset_converter(const CHARSET_INFO * const tocs);
772
int fix_outer_field(Session *session, Field **field, Item **reference);
773
virtual Item *update_value_transformer(unsigned char *select_arg);
774
virtual void print(String *str, enum_query_type query_type);
776
friend class Item_default_value;
777
friend class Item_insert_value;
778
friend class st_select_lex_unit;
591
#include <drizzled/item/basic_constant.h>
592
#include <drizzled/item/ident.h>
593
#include <drizzled/item/field.h>
594
#include <drizzled/item/num.h>
596
void mark_as_dependent(Session *session,
598
st_select_lex *current,
599
Item_ident *resolved_item,
600
Item_ident *mark_item);
602
Item** resolve_ref_in_select_and_group(Session *session,
604
st_select_lex *select);
781
606
class Item_null :public Item_basic_constant