summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-07-26 08:25:25 -0700
committerunknown <igor@rurik.mysql.com>2005-07-26 08:25:25 -0700
commit5cdd9463ed92a058d2c0bfd3b38f08b3d78585b4 (patch)
tree3441a2b6c774d72e1e1ba592b27a7e8d50a2b1c1 /sql/item.h
parent4fc1f429c1bf9a7f76692fb3df97cb42570cea4a (diff)
parent4903707c341c4a94e775682a71287361eaf24b92 (diff)
downloadmariadb-git-5cdd9463ed92a058d2c0bfd3b38f08b3d78585b4.tar.gz
Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0 sql/item.h: Auto merged
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/item.h b/sql/item.h
index 108deeb7440..a17c2af2823 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1473,7 +1473,13 @@ 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 (result_field ? new Item_field(result_field) :
+ (*ref)->get_tmp_table_item(thd));
+ }
table_map used_tables() const
{
return depended_from ? OUTER_REF_TABLE_BIT : (*ref)->used_tables();
@@ -1711,7 +1717,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);