Hello,
If I have two transactions in two different sessions that execute a "INSERT INTO ..." of the same primary key into the one table, one session will wait for the other session to complete before being allowed to resume.
Something like this obviously has to happen, Mysql has no idea of the first transaction is going to complete with "rollback" or "commit" and as such can't tell if the second INSERT should fail or not (conflicting primary key).
It didn't match my limited understanding of how SQL transactions work however, and I would be interested to more about why the second process is blocked, and what the scope is for this block, etc. Anyone have any good references?
The only thing I can find about transactions is that they are atomic, but nothing about transactions causing other processes to block.
Is this the same for other non-mysql databases?
Thanks
--
Brian May <
brian@microcomaustralia.com.au>