From c703954578ce3c806112bbc2319988fc289ab8a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 15 Mar 2005 17:15:47 +0400 Subject: # 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(). --- sql/sql_string.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/sql_string.h') 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) { -- cgit v1.2.1