• unknown's avatar
    Bug #28550 "Potential bugs related to the return type of the CHAR function". · 04311fab
    unknown authored
      
    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
    04311fab
item.cc 187 KB