• Sergey Glukhov's avatar
    Bug#52164 Assertion failed: param.sort_length, file .\filesort.cc, line 149 · d5325c77
    Sergey Glukhov authored
    The crash happens because of incorrect max_length calculation
    in QUOTE function(due to overflow). max_length is set
    to 0 and it leads to assert failure.
    The fix is to cast expression result to
    ulonglong variable and adjust it if the
    result exceeds MAX_BLOB_WIDTH.
    
    
    mysql-test/r/func_str.result:
      test case
    mysql-test/t/func_str.test:
      test case
    sql/item_strfunc.h:
      cast expression result to ulonglong variable and
      adjust it if the result exceeds MAX_BLOB_WIDTH.
    d5325c77
func_str.result 95.8 KB