• Marko Mäkelä's avatar
    Bug#11759688 52020: InnoDB can still deadlock on just INSERT...ON DUPLICATE KEY · a0a51251
    Marko Mäkelä authored
    a.k.a. Bug#7975 deadlock without any locking, simple select and update
    
    Bug#7975 was reintroduced when the storage engine API was made
    pluggable in MySQL 5.1. Instead of looking at thd->lex directly, we
    rely on handler::extra(). But, we were looking at the wrong extra()
    flag, and we were ignoring the TRX_DUP_REPLACE flag in places where we
    should obey it.
    
    innodb_replace.test: Add tests for hopefully all affected statement
    types, so that bug should never ever resurface. This kind of tests
    should have been added when fixing Bug#7975 in MySQL 5.0.3 in the
    first place.
    
    rb:806 approved by Sunny Bains
    a0a51251
innodb_replace.test 5.06 KB