diff options
author | unknown <bar@mysql.com> | 2005-03-15 17:15:47 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-03-15 17:15:47 +0400 |
commit | c703954578ce3c806112bbc2319988fc289ab8a1 (patch) | |
tree | 7c2353f000f6d7f885619924e485c5b62d93c768 /sql/sql_string.h | |
parent | be26b499695adfb6c02f0131e0016613433cc28c (diff) | |
download | mariadb-git-c703954578ce3c806112bbc2319988fc289ab8a1.tar.gz |
# Bug#8785 Problem with nested concats and
character set conversion of a string constant.
mysql-test/r/ctype_utf8.result:
Adding test
mysql-test/t/ctype_utf8.test:
Addign test
sql/item_strfunc.cc:
Remove previous fix: it was not 100% correct.
A non const_item() can return a constant String.
sql/sql_string.h:
A new method to cut Alloced_length to str_length for
string constants, to avoid reusing them as a buffer
in things like CONCAT().
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index 3ad4689cf36..8dff5558120 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -177,6 +177,10 @@ public: } } } + inline void shrink_to_length() + { + Alloced_length= str_length; + } bool is_alloced() { return alloced; } inline String& operator = (const String &s) { |