• svoj@mysql.com/june.mysql.com's avatar
    BUG#27516 - divide by zero crash during optimize table · ed81a81a
    svoj@mysql.com/june.mysql.com authored
    When a table status is requested by statement like SHOW TABLE
    STATUS and there is another statement (e.g. DELETE) sets
    number of records to 0 concurrently, we may get division by
    zero error, which crashes a server.
    
    This is fixed by using thread local variable x->records instead
    of shared info->state->records when we check if it is zero and
    divide by it.
    ed81a81a
mi_info.c 4.39 KB