diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc index d321b74c1fc..9ba93780334 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -8201,6 +8201,20 @@ void Item_cache::print(String *str, enum_query_type query_type) str->append(')'); } +/** + Assign to this cache NULL value if it is possible +*/ + +void Item_cache::set_null() +{ + if (maybe_null) + { + null_value= TRUE; + value_cached= TRUE; + } +} + + bool Item_cache_int::cache_value() { if (!example) @@ -8671,6 +8685,20 @@ void Item_cache_row::bring_value() } +/** + Assign to this cache NULL value if it is possible +*/ + +void Item_cache_row::set_null() +{ + Item_cache::set_null(); + if (!values) + return; + for (uint i= 0; i < item_count; i++) + values[i]->set_null(); +}; + + Item_type_holder::Item_type_holder(THD *thd, Item *item) :Item(thd, item), enum_set_typelib(0), fld_type(get_real_type(item)) { |