diff options
author | unknown <evgen@moonbone.local> | 2007-02-21 23:18:17 +0300 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2007-02-21 23:18:17 +0300 |
commit | a1234294c6344e648a60c7b0489985f5c16cd8a6 (patch) | |
tree | 0e6646d66100401954f73b666a8c8f9438d63d96 /sql/item.h | |
parent | a06fe4abde6e93286867dc9ca32ddb69380eb107 (diff) | |
parent | f8855142d7a498c540f8f92ab1095a1038aeb079 (diff) | |
download | mariadb-git-a1234294c6344e648a60c7b0489985f5c16cd8a6.tar.gz |
Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/23800-bug1-5.0-opt-mysql
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/sql/item.h b/sql/item.h index 7a0bdbaca8f..ec6d4fabae5 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1220,7 +1220,7 @@ public: uint have_privileges; /* field need any privileges (for VIEW creation) */ bool any_privileges; - + bool fixed_as_field; Item_field(Name_resolution_context *context_arg, const char *db_arg,const char *table_name_arg, const char *field_name_arg); @@ -1824,7 +1824,7 @@ class Item_ref :public Item_ident protected: void set_properties(); public: - enum Ref_Type { REF, DIRECT_REF, VIEW_REF }; + enum Ref_Type { REF, DIRECT_REF, VIEW_REF, OUTER_REF }; Field *result_field; /* Save result here */ Item **ref; Item_ref(Name_resolution_context *context_arg, @@ -1885,7 +1885,7 @@ public: (*ref)->get_tmp_table_item(thd)); } table_map used_tables() const - { + { return depended_from ? OUTER_REF_TABLE_BIT : (*ref)->used_tables(); } table_map not_null_tables() const { return (*ref)->not_null_tables(); } @@ -1958,6 +1958,40 @@ public: }; +class Item_outer_ref :public Item_direct_ref +{ +public: + Item_field *outer_field; + Item_outer_ref(Name_resolution_context *context_arg, + Item_field *outer_field_arg) + :Item_direct_ref(context_arg, 0, outer_field_arg->table_name, + outer_field_arg->field_name), + outer_field(outer_field_arg) + { + ref= (Item**)&outer_field; + set_properties(); + fixed= 0; + } + void cleanup() + { + ref= (Item**)&outer_field; + fixed= 0; + Item_direct_ref::cleanup(); + outer_field->cleanup(); + } + void save_in_result_field(bool no_conversions) + { + outer_field->save_org_in_field(result_field); + } + bool fix_fields(THD *, Item **); + table_map used_tables() const + { + return (*ref)->const_item() ? 0 : OUTER_REF_TABLE_BIT; + } + virtual Ref_Type ref_type() { return OUTER_REF; } +}; + + class Item_in_subselect; |