summaryrefslogtreecommitdiff
path: root/sql/item_buff.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-07-25 12:57:23 -0700
committerunknown <igor@rurik.mysql.com>2005-07-25 12:57:23 -0700
commit1c3f8cc214db5d487ea275dbbc9ec24712050fd3 (patch)
tree4f5f2513b048293936bbcdb418a9b120f937ffa5 /sql/item_buff.cc
parent9a0d9c35697c250f3136b1cb7b6a184cef3c6d45 (diff)
downloadmariadb-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_buff.cc')
-rw-r--r--sql/item_buff.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_buff.cc b/sql/item_buff.cc
index a67e420170a..9db2f465080 100644
--- a/sql/item_buff.cc
+++ b/sql/item_buff.cc
@@ -25,9 +25,9 @@
Cached_item *new_Cached_item(THD *thd, Item *item)
{
- if (item->type() == Item::FIELD_ITEM &&
- !(((Item_field *) item)->field->flags & BLOB_FLAG))
- return new Cached_item_field((Item_field *) item);
+ if (item->real_item()->type() == Item::FIELD_ITEM &&
+ !(((Item_field *) (item->real_item()))->field->flags & BLOB_FLAG))
+ return new Cached_item_field((Item_field *) (item->real_item()));
switch (item->result_type()) {
case STRING_RESULT:
return new Cached_item_str(thd, (Item_field *) item);