diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2014-09-04 12:43:41 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2014-09-04 12:43:41 +0400 |
commit | bf4347eba07a7e8f11af07a684381d48d673e028 (patch) | |
tree | c12216ff78e4408f781d5e4cae94c293091a0f0d /sql/item.h | |
parent | c9d3b27d299ab7f52e7d15147bef92062e13b4df (diff) | |
download | mariadb-git-bf4347eba07a7e8f11af07a684381d48d673e028.tar.gz |
Creating a new class in_string::Item_string_for_in_vector
and moving set_value() from Item_string to Item_string_for_in_vector,
as set_value() updates the members incompletely
(e.g. does not update max_length),
so it was dangerous to have set_value() available in Item_string.
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/item.h b/sql/item.h index 2647f0b20bd..9d07fedfbce 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2762,6 +2762,7 @@ public: decimals= NOT_FIXED_DEC; fixed= 1; } +protected: /* Just create an item and do not fill string representation */ Item_string(CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE) : m_cs_specified(FALSE) @@ -2772,6 +2773,7 @@ public: decimals= NOT_FIXED_DEC; fixed= 1; } +public: Item_string(const char *name_par, const char *str, uint length, CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE, uint repertoire= MY_REPERTOIRE_UNICODE30) @@ -2785,11 +2787,6 @@ public: // it is constant => can be used without fix_fields (and frequently used) fixed= 1; } - void set_value(const String *str) - { - str_value= *str; - collation.set(str->charset()); - } void copy_value(const char *str, uint32 length, CHARSET_INFO *fromcs, CHARSET_INFO *tocs, uint *cnv_errors) { |