• Ajo Robert's avatar
    Bug #20760261 mysqld crashed in materialized_cursor:: · f3dce250
    Ajo Robert authored
    send_result_set_metadata
    
    Analysis
    --------
    Cursor inside trigger accessing NEW/OLD row leads server exit.
    
    The reason for the bug was that implementation of function
    create_tmp_table() was not considering Item::TRIGGER_FIELD_ITEM
    as possible alternative for type of class being instantiated.
    This was resulting in a mismatch between a number of columns
    in result list and temp table definition. This mismatch leads
    to the failure of assertion
    DBUG_ASSERT(send_result_set_metadata.elements == item_list.elements)
    in the method Materialized_cursor::send_result_set_metadata
    in debug mode.
    
    Fix:
    ---
    Added code to consider Item::TRIGGER_FIELD_ITEM as valid
    type while creating fields.
    f3dce250
sql_insert.cc 131 KB