Added new method to set string's charset
This commit is contained in:
parent
823d4da78b
commit
21ef10ef2e
@ -890,6 +890,9 @@ void in_string::set(uint pos,Item *item)
|
||||
String *res=item->val_str(str);
|
||||
if (res && res != str)
|
||||
*str= *res;
|
||||
// BAR TODO: I'm not sure this is absolutely correct
|
||||
if (!str->charset())
|
||||
str->set_charset(default_charset_info);
|
||||
}
|
||||
|
||||
byte *in_string::get_value(Item *item)
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
{ sql_element_free(ptr_arg); }
|
||||
~String() { free(); }
|
||||
|
||||
inline void set_charset(CHARSET_INFO *charset) { str_charset=charset; }
|
||||
inline CHARSET_INFO *charset() const { return str_charset; }
|
||||
inline uint32 length() const { return str_length;}
|
||||
inline uint32 alloced_length() const { return Alloced_length;}
|
||||
|
Loading…
x
Reference in New Issue
Block a user