From 349841118f6e209faedc09e59282d6751706a06f Mon Sep 17 00:00:00 2001 From: "kaa@polly.(none)" <> Date: Sun, 21 Oct 2007 21:45:31 +0400 Subject: Bug #28550 "Potential bugs related to the return type of the CHAR function". Since, as of MySQL 5.0.15, CHAR() arguments larger than 255 are converted into multiple result bytes, a single CHAR() argument can now take up to 4 bytes. This patch fixes Item_func_char::fix_length_and_dec() to take this into account. This patch also fixes a regression introduced by the patch for bug21513. As now we do not always have the 'name' member of Item set for Item_hex_string and Item_bin_string, an own print() method has been added to Item_hex_string so that it could correctly be printed by Item_func::print_args(). --- sql/item.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/item.h') diff --git a/sql/item.h b/sql/item.h index 913dca50bff..b611c59b8f1 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1858,6 +1858,7 @@ public: enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; } // to prevent drop fixed flag (no need parent cleanup call) void cleanup() {} + void print(String *str); bool eq(const Item *item, bool binary_cmp) const; virtual Item *safe_charset_converter(CHARSET_INFO *tocs); }; -- cgit v1.2.1