diff options
author | unknown <igor@rurik.mysql.com> | 2005-07-25 12:57:23 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-07-25 12:57:23 -0700 |
commit | 1c3f8cc214db5d487ea275dbbc9ec24712050fd3 (patch) | |
tree | 4f5f2513b048293936bbcdb418a9b120f937ffa5 /sql/item.h | |
parent | 9a0d9c35697c250f3136b1cb7b6a184cef3c6d45 (diff) | |
download | mariadb-git-1c3f8cc214db5d487ea275dbbc9ec24712050fd3.tar.gz |
sql_select.cc:
Fixed bug #11412.
Reversed the patch of cs 1.1934 for the function
create_tmp_table. Modified the function to support
tem_ref objects created for view fields.
item_buff.cc:
Fixed bug #11412.
Modified implementation of new_Cached_item to support
cacheing of view fields.
item.h:
Fixed bug #11412.
Changed implementation of Item_ref::get_tmp_table_field and
added Item_ref::get_tmp_table_item to support Item_ref objects
created for view fields.
view.test, view.result:
Added a test case for bug #11412.
mysql-test/r/view.result:
Added a test case for bug #11412.
mysql-test/t/view.test:
Added a test case for bug #11412.
sql/item.h:
Fixed bug #11412.
Changed implementation of Item_ref::get_tmp_table_field and
added Item_ref::get_tmp_table_item to support Item_ref objects
created for view fields.
sql/item_buff.cc:
Fixed bug #11412.
Modified implementation of new_Cached_item to support
cacheing of view fields.
sql/sql_select.cc:
Fixed bug #11412.
Reversed the patch of cs 1.1934 for the function
create_tmp_table. Modified the function to support
tem_ref objects created for view fields.
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/item.h b/sql/item.h index 5a1cf193806..259b3654461 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1464,7 +1464,10 @@ public: void save_org_in_field(Field *field) { (*ref)->save_org_in_field(field); } enum Item_result result_type () const { return (*ref)->result_type(); } enum_field_types field_type() const { return (*ref)->field_type(); } - Field *get_tmp_table_field() { return result_field; } + Field *get_tmp_table_field() + { return result_field ? result_field : (*ref)->get_tmp_table_field(); } + Item *get_tmp_table_item(THD *thd) + { return (*ref)->get_tmp_table_item(thd); } table_map used_tables() const { return depended_from ? OUTER_REF_TABLE_BIT : (*ref)->used_tables(); @@ -1702,7 +1705,7 @@ class Cached_item_field :public Cached_item public: Cached_item_field(Item_field *item) { - field=item->field; + field= item->field; buff= (char*) sql_calloc(length=field->pack_length()); } bool cmp(void); |