• Ramil Kalimullin's avatar
    Fix for bug#57272: crash in rpad() when using utf8 · 42550e21
    Ramil Kalimullin authored
    Problem: if multibyte and binary string arguments passed to 
    RPAD(), LPAD() or INSERT() functions, they might return 
    wrong results or even lead to a server crash due to missed
    character set convertion.
    
    Fix: perform the convertion if necessary.
    
    
    mysql-test/r/ctype_utf8.result:
      Fix for bug#57272: crash in rpad() when using utf8
        - test result.
    mysql-test/t/ctype_utf8.test:
      Fix for bug#57272: crash in rpad() when using utf8
        - test case.
    sql/item_strfunc.cc:
      Fix for bug#57272: crash in rpad() when using utf8
        - convert multibyte argument's character set to binary in case of
      FUNCTION(MULTIBYTE_ARG, .., BINARY_ARG,..) for RPAD(), LPAD() and 
      INSERT() functions.
    42550e21
item_strfunc.cc 92.4 KB