I have a few questions about MySQL table lock
. I appreciate if anyone answers :)
Does MySQL lock tables automatically in the following cases:
SELECT id FROM members;
UPDATE members SET name = 'john' WHERE id = 7;
What is the difference between these two:
LOCK TABLE items READ ; SELECT * FROM 'items;
SELECT * FROM 'items';
For some reason I was under the impression that MySQL automatically locks the tables on necessary occasions! How can I check when and how the locking happens?
Thank you.