diff options
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/item.h b/sql/item.h index c7a97ca716a..3af33fd2d31 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2982,6 +2982,7 @@ public: class Cached_item_str :public Cached_item { Item *item; + uint32 value_max_length; String value,tmp_value; public: Cached_item_str(THD *thd, Item *arg); @@ -3266,6 +3267,12 @@ public: bool basic_const_item() const { return test(example && example->basic_const_item());} virtual void clear() { null_value= TRUE; value_cached= FALSE; } + Item_result result_type() const + { + if (!example) + return INT_RESULT; + return Field::result_merge_type(example->field_type()); + } }; @@ -3335,7 +3342,9 @@ public: is_varbinary(item->type() == FIELD_ITEM && cached_field_type == MYSQL_TYPE_VARCHAR && !((const Item_field *) item)->field->has_charset()) - {} + { + collation.set(const_cast<DTCollation&>(item->collation)); + } double val_real(); longlong val_int(); String* val_str(String *); |