diff options
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 2ff0a4e5e2f..71674c61d47 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -883,6 +883,18 @@ class in_string :public in_vector { char buff[STRING_BUFFER_USUAL_SIZE]; String tmp; + class Item_string_for_in_vector: public Item_string + { + public: + Item_string_for_in_vector(CHARSET_INFO *cs): + Item_string(cs) + { } + void set_value(const String *str) + { + str_value= *str; + collation.set(str->charset()); + } + }; public: in_string(uint elements,qsort2_cmp cmp_func, CHARSET_INFO *cs); ~in_string(); @@ -890,12 +902,12 @@ public: uchar *get_value(Item *item); Item* create_item() { - return new Item_string(collation); + return new Item_string_for_in_vector(collation); } void value_to_item(uint pos, Item *item) { String *str=((String*) base)+pos; - Item_string *to= (Item_string*)item; + Item_string_for_in_vector *to= (Item_string_for_in_vector*) item; to->set_value(str); } Item_result result_type() { return STRING_RESULT; } |