• qggcs's avatar
    MDEV-29264: JSON function overflow error based on LONGTEXT field · 82017511
    qggcs authored
    Analysis: The JSON functions(JSON_ARRAY[OBJECT|ARRAY_APPEND|ARRAY_INSERT|INSERT|SET|REPLACE]) result is truncated when the function is called based on LONGTEXT field. The overflow occurs when computing the result length due to the LONGTEXT max length is same as uint32 max length. It lead to wrong result length.
    Fix: Add static_cast<ulonglong> to avoid uint32 overflow and fix the arguments used.
    82017511
func_json.test 30.5 KB