• Thayumanavar's avatar
    BUG#19875331 - HANDLE_FATAL_SIGNAL 11 IN STRMAKE · c9f307c4
    Thayumanavar authored
    Problem Description And Fix:
    Inserting a fudged record in mysql.proc with the dbname
    column value as test and the name column as empty, will
    cause a crash in mysqld when we run the command DROP
    DATABASE test.
     During DROP DATABASE test, mysql_rm_db subsequently
    calls lock_db_routines. In the routine we fetch the
    field 'name' from mysql.proc by calling the underlying
    storage engine API in lock_db_routines. This cause NULL
    value as the field column of mysql.proc and subsequent
    dereference MDL_request::init leads to crash.
    Modifying mysql.proc using SQL command by user is not
    supported, but in principle, there is a possibility
    of mysql.proc getting corrupted which can also lead
    to empty fields and arbitary values. The patch fixes
    the crash by checking NULL and propagating the appopriate
    error code to the user.
    c9f307c4
sp.cc 68.9 KB