mysql - Since innodb has gap locks at the RR isolation level, why do two transactions still produce deadlocks due to different locking orders? ?
ringa_lee
ringa_lee 2017-05-18 10:54:38
0
1
699

Deadlock is caused by multiple transactions competing for the same resource. Whether it is two SQL statements in two transactions, the locking order of the resources being operated is different, or the locking order of the resources operated by one SQL statement in the two transactions is different. Why is the gap lock not locking in the scope, thus suspending another transaction's request for the resource?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
某草草

I think specific issues should be dealt with in detail. Let’s take a detailed look at your two SQLs and then analyze them in detail

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!