• Kristofer Pettersson's avatar
    Bug#40127 Multiple table DELETE IGNORE hangs on foreign key constraint violation · a20bc967
    Kristofer Pettersson authored
              on 5.0            
    The server crashes on an assert in net_end_statement indicating that the
    Diagnostics area wasn't set properly during execution.
    This happened on a multi table DELETE operation using the IGNORE keyword.
    The keyword is suppose to allow for execution to continue on a best effort
    despite some non-fatal errors. Instead execution stopped and no client
    response was sent which would have led to a protocol error if it hadn't been
    for the assert.
    This patch corrects this issue by checking for the existence of an IGNORE
    option before setting an error state during row-by-row delete iteration.
    
    
    mysql-test/r/innodb_mysql.result:
      * Added test case for bug40127
    mysql-test/t/innodb_mysql.test:
      * Added test case for bug40127
    sql/sql_delete.cc:
      * IGNORE option wasn't implemented in multi_delete::send_data
        and multi_delete::do_deletes
    a20bc967
sql_delete.cc 33.1 KB