summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorJonathan Perkin <jonathan.perkin@oracle.com>2011-02-08 14:59:03 +0100
committerJonathan Perkin <jonathan.perkin@oracle.com>2011-02-08 14:59:03 +0100
commitf13788c9fd8af035dd9a5af446d8a88214760fdc (patch)
treed87bb4b1cece4e1570ba257393e94057e79bd518 /sql/item.h
parent8805ecee531f048726382fdd47cb2b59d8d6a711 (diff)
parent31e87bb552b5a36b25cb14c2c6f380a06cfd981c (diff)
downloadmariadb-git-f13788c9fd8af035dd9a5af446d8a88214760fdc.tar.gz
Merge from mysql-5.5.9-release
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/item.h b/sql/item.h
index 846cda360d0..fc203f03e79 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -3203,11 +3203,10 @@ class Item_cache: public Item_basic_constant
protected:
Item *example;
table_map used_table_map;
- /*
- Field that this object will get value from. This is set/used by
+ /**
+ Field that this object will get value from. This is used by
index-based subquery engines to detect and remove the equality injected
by IN->EXISTS transformation.
- For all other uses of Item_cache, cached_field doesn't matter.
*/
Field *cached_field;
enum enum_field_types cached_field_type;
@@ -3275,6 +3274,14 @@ public:
{
return (value_cached || cache_value()) && !null_value;
}
+
+ /**
+ If this item caches a field value, return pointer to underlying field.
+
+ @return Pointer to field, or NULL if this is not a cache for a field value.
+ */
+ Field* field() { return cached_field; }
+
virtual void store(Item *item);
virtual bool cache_value()= 0;
bool basic_const_item() const