• Davi Arnaut's avatar
    Bug#37016: TRUNCATE TABLE removes some rows but not all · 577e390e
    Davi Arnaut authored
    The special TRUNCATE TABLE (DDL) transaction wasn't being properly
    rolled back if a error occurred during row by row deletion. The
    error can be caused by a foreign key restriction imposed by InnoDB
    SE and would cause the server to erroneously issue a implicit
    commit.
    
    The solution is to rollback the transaction if a truncation via row
    by row deletion fails, otherwise commit. All effects of a TRUNCATE 
    ABLE operation are rolled back if a row by row deletion fails.
    577e390e
sql_delete.cc 31.8 KB