Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
修改锁位置
  • Loading branch information
jonay930128 authored Aug 2, 2019
1 parent 0cdb3a3 commit 9699593
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
|update|update|lock_mode X locks rec but not gap|lock mode S|lock_mode X locks rec but not gap|[11](https://github.com/aneasystone/mysql-deadlocks/blob/master/11.md)|
|update|update|lock_mode X|lock_mode X locks gap before rec insert intention|lock_mode X locks rec but not gap|[16](https://github.com/aneasystone/mysql-deadlocks/blob/master/16.md)|
|update|update|lock_mode X locks gap before rec insert intention|lock_mode X locks gap before rec insert intention|lock_mode X|[17](https://github.com/aneasystone/mysql-deadlocks/blob/master/17.md)|
|update|delete|lock_mode X locks rec but not gap|lock mode S|lock_mode X|[19](https://github.com/aneasystone/mysql-deadlocks/blob/master/19.md)|
|update|delete|lock_mode X locks rec but not gap|lock_mode X|lock mode S|[19](https://github.com/aneasystone/mysql-deadlocks/blob/master/19.md)|

表中的语句虽然大多数只列出了 delete 和 insert,但实际上绝大多数的 delete 语句和 update 或 select ... for update 加锁机制是一样的,所以为了避免重复,对于 update 语句就不在一起汇总了(当然也有例外,譬如使用 update 对索引进行更新时加锁机制和 delete 是有区别的,这种情况我会单独列出,如案例 11)。

Expand Down Expand Up @@ -117,4 +117,4 @@ MySQL init process done. Ready for start up.
- [ ] 重现案例 17
- [x] 重现案例 18
- [ ] 由于相同的测试脚本在并发的时候可能产生不同的死锁,后续可以写个脚本来解析 error.log 看看发生了多少次死锁
- [ ] 使用 mysqlslap 测试不太方面,后续可以写个脚本来模拟并发事务
- [ ] 使用 mysqlslap 测试不太方面,后续可以写个脚本来模拟并发事务

0 comments on commit 9699593

Please sign in to comment.