summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorJacob Mathew <jacob.mathew@mariadb.com>2017-02-10 13:41:34 -0800
committerJacob Mathew <jacob.mathew@mariadb.com>2017-02-10 13:41:34 -0800
commitcd53525d7c97a7c2b69873fbbd28982844e3cae3 (patch)
tree9ad5f74b8f4998a793b9d22d3b0d3aea224fbfa6 /sql/item.h
parent070a8754c44e29572d1fafbfece251ace23ba41d (diff)
downloadmariadb-git-MDEV_10355.tar.gz
Changes to fix CREATE TABLE bug MDEV_10355.MDEV_10355MDEV-10355
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h
index bb2f05b4c6d..72b48b5e421 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -5436,6 +5436,7 @@ public:
static Item_cache* get_cache(THD *thd, const Item *item);
static Item_cache* get_cache(THD *thd, const Item* item, const Item_result type);
+ virtual const char* cached_item_name() const { return "cache"; }
virtual void keep_array() {}
virtual void print(String *str, enum_query_type query_type);
bool eq_def(const Field *field)
@@ -5448,7 +5449,7 @@ public:
}
bool check_vcol_func_processor(void *arg)
{
- return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE);
+ return mark_unsupported_function(cached_item_name(), arg, VCOL_IMPOSSIBLE);
}
/**
Check if saved item has a non-NULL value.
@@ -5529,6 +5530,7 @@ public:
class Item_cache_temporal: public Item_cache_int
{
+ const char *cached_temporal_item_name;
public:
Item_cache_temporal(THD *thd, enum_field_types field_type_arg);
String* val_str(String *str);
@@ -5551,6 +5553,8 @@ public:
Item *convert_to_basic_const_item(THD *thd);
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
{ return get_item_copy<Item_cache_temporal>(thd, mem_root, this); }
+ const char *cached_item_name() const
+ { return cached_temporal_item_name ? cached_temporal_item_name : "cache"; }
};