The question is rather simple but I couldn't find a precise answer: In a myisam db, what happens if a php file locks a table (with an atomic operation, say an INSERT) and another php file tries to access the same table (reading or writing)?
Now, while it is obvious that the second session will not be able to access the table, what exactly happens? Does it return some kind of error? Does it wait in queue until it is able to access it?
The second connection will wait for the lock to free.
With MyISAM any write (insert / update / delete) will lock the table,
However with INNODB table type the atomic operation will only lock the affected rows
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With