Do mysql things necessarily cause table locks?

Does

mysql things necessarily cause table locks?

Mar.24,2021

transaction isolation level understood, but whether things will cause table locks does not quite understand


this depends on the transaction isolation level. Mysql defaults to "repeatable" and prevents illusion reading through the multi-version concurrency control of the innodb engine (MVCC,Multiversion Concurrency Control) mechanism). Similarly, the subsequent select will not be locked.
when the transaction isolation level is raised to "serialization", as long as the previous session does not have a commit (including after the select), then any operation of the subsequent session will be locked.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3dca0-2c3a8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3dca0-2c3a8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?