• gshchepa/uchum@host.loc's avatar
    Fixed bug #35993: memory corruption and crash with multibyte conversion. · 9028d2e4
    gshchepa/uchum@host.loc authored
    Grouping or ordering of long values in not indexed BLOB/TEXT columns
    with GBK or BIG5 charsets crashes the server.
    
    MySQL server uses sorting (the filesort procedure) in the temporary
    table to evaluate the GROUP BY clause in case of lack of suitable index.
    That procedure takes into account only first @max_sort_length bytes
    (system variable, usually 1024) of TEXT/BLOB sorting key string.
    The my_strnxfrm_gbk and my_strnxfrm_big5 fill temporary keys
    with data of whole blob length instead of @max_sort_length bytes
    length. That buffer overrun has been fixed.
    9028d2e4
ctype-big5.c 343 KB