mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
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(). mysql-test/r/func_str.result: Import patch bug288550.patch mysql-test/t/func_str.test: Import patch bug288550.patch sql/item.cc: Import patch bug288550.patch sql/item.h: Import patch bug288550.patch sql/item_strfunc.h: Import patch bug288550.patch
This commit is contained in:
parent
62a7e160bc
commit
04311fabaa
5 changed files with 38 additions and 2 deletions
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue