What is the relationship between isolation levels and locks in mysql?

isolation level and lock appearance seem to solve the problems caused by database transaction concurrency, right? What"s the relationship between the two? I"m a little confused

Mar.28,2021

lock is a classic solution to concurrency problems. For simple concurrency problems, locks can be used. However, for complex problems such as transactions, it is not possible to have locks alone, such as whether two transactions can see the data modified by each other, and whether they need to ensure that the reads within a transaction are repeatable. Different solutions to these problems will affect the logic and execution results of complex applications in concurrency, and a little carelessness will lead to wrong results. Therefore, the concept of isolation level is introduced to standardize the isolation of transactions, that is to say, isolation levels are actually introduced to deal with the complex problem of transactions, and there is no isolation level if there is only concurrency without transactions.

in a nutshell, locks are the basis of concurrency control, and isolation levels are the overall solution to transactions at a higher level.

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-1e44631-44aa1.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-1e44631-44aa1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?