• Monty's avatar
    MDEV-17551 assert or crashed table when using blobs · 9053047f
    Monty authored
    The bug was that when long item-strings was converted to VARCHAR,
    type_handler::string_type_handler() didn't take into account max
    VARCHAR length.  The resulting Aria temporary table was created with
    a VARCHAR field of length 1 when it should have been 65537. This caused
    MariaDB to send impossible records to ma_write() and Aria reported
    eventually the table as crashed.
    
    Fixed by updating Type_handler::string_type_handler() to not create too long
    VARCHAR fields. To make things extra safe, I also added checks in when
    writing dynamic Aria records to ensure we find the wrong record during write
    instead of during read.
    9053047f
ma_check.c 234 KB