summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index 5f4f96f97d3..8360fa61498 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -3191,6 +3191,15 @@ public:
{
return this == item;
}
+ /**
+ Check if saved item has a non-NULL value.
+ Will cache value of saved item if not already done.
+ @return TRUE if cached value is non-NULL.
+ */
+ bool has_value()
+ {
+ return (value_cached || cache_value()) && !null_value;
+ }
virtual void store(Item *item);
virtual bool cache_value()= 0;
bool basic_const_item() const