Innodb里面关于如何处理死锁有这么一句:
Access your tables and rows in a fixed order. Then transactions form well-defined queues and do not deadlock.
问下,这个怎么理解,不是很明白 fixed order是么样子的order?
Access your tables and rows in a fixed order. Then transactions form well-defined queues and do not deadlock.
问下,这个怎么理解,不是很明白 fixed order是么样子的order?
比如两个表a,b
在事务中用到两个表的话永远是先用a再用b
操作系统原理的教材上有一个章节会讲这些基础知识。