Will there be a deadlock in MyIsam?

MyIsam only supports table locks. Many places say that deadlocks will not occur in MyIsam. Is that so? If my two transactions query two tables and add write locks at the same time, but the locking order is not the same, will it deadlock?

Mar.17,2021

for example, client 1 and 2 all need two tables aforme b. If you are in two statements, you will not be able to deadlock, because statement 1 of client1 is released after using a, and because there is no transaction, you will not continue to hold locks, client2 at most, and so on, and there will be no deadlocks.
if you are in a statement, the order in which locks are acquired is the same, and at most there is no deadlock, because there is no loop waiting.


MyIsam does not support transactions. Every time myisam reads and writes, read-write locks are implicitly added, and there is no lock. The read lock is shared, while the write lock is exclusive, meaning that one session must wait

while the other session is writing.
Menu