• Dmitry Lenev's avatar
    Fix for bug #17356954 "CANNOT USE SAVEPOINTS AFTER ER_LOCK_DEADLOCK OR · 45824782
    Dmitry Lenev authored
    ER_LOCK_WAIT_TIMEOUT".
    
    The problem was that after changes caused by fix bug 14188793 "DEADLOCK
    CAUSED BY ALTER TABLE DOEN'T CLEAR STATUS OF ROLLBACKED TRANSACTION"/
    bug 17054007 "TRANSACTION IS NOT FULLY ROLLED BACK IN CASE OF INNODB
    DEADLOCK implicit rollback of transaction which occurred on ER_LOCK_DEADLOCK
    (and ER_LOCK_WAIT_TIMEOUT if innodb_rollback_on_timeout option was set)
    didn't start new transaction in @@autocommit=1 mode.
    
    Such behavior although consistent with behavior of explicit ROLLBACK has
    broken expectations of users and backward compatibility assumptions.
    
    This patch fixes problem by reverting to starting new transaction
    in 5.5/5.6.
    
    The plan is to keep new behavior in trunk so the code change from this
    patch is to be null-merged there.
    45824782
transaction.cc 21.6 KB