• Ramil Kalimullin's avatar
    Fix for bug#44774: load_file function produces valgrind warnings · 8b9084ef
    Ramil Kalimullin authored
    Problem: using LOAD_FILE() in some cases we pass a file name string
    without a trailing '\0' to fn_format() which relies on that however.
    That may lead to valgrind warnings.
    
    Fix: add a trailing '\0' to the file name passed to fn_format().
    
    
    mysql-test/r/func_str.result:
      Fix for bug#44774: load_file function produces valgrind warnings
        - test result.
    mysql-test/t/func_str.test:
      Fix for bug#44774: load_file function produces valgrind warnings
        - test case.
    sql/item_strfunc.cc:
      Fix for bug#44774: load_file function produces valgrind warnings
        - passing a file name to fn_format(), file_name->c_ptr() replaced
          with file_name->c_ptr_safe() to ensure we have a trailing '\0'.
    8b9084ef
func_str.test 41.9 KB