This is the default behavior with MyISAM tables. If you really want to lock the MyISAM table, you must manually obtain the lock at the table level. The transaction isolation level, START TRANSACTION , COMMIT , ROLLBACK does not affect the behavior of MyISAM tables, since MyISAM does not support transactions .
Learn more about internal locking mechanisms.
The READ lock is still implicitly obtained and released after executing the SELECT . Note that several simultaneous, simultaneous, SELECT statements can be executed at the same time, since several sessions may contain a READ lock in the same table.
Conversely, a WRITE lock is implicitly obtained before executing an INSERT or UPDATE or DELETE . This means that reading (not to mention simultaneous recording) can occur as long as writing is performed * .
The above applies only to the MyISAM, MEMORY, and MERGE tables.
You might want to know more about this:
* However, these locks are not always required due to this clever trick :
The MyISAM storage engine supports parallel inserts to reduce the conflict between readers and writers for a given table: if the MyISAM table does not have free blocks in the middle of the data file, rows are always inserted at the end of the data file. In this case, you can freely mix parallel INSERT and SELECT for the MyISAM table without locks.
source share