With InnoDB you achieve this by setting the transaction isolation level to: READ UNCOMMITTED.
At this isolation level:
SELECT statements are executed in a non-blocking manner, but perhaps an earlier version of the string may be used. Therefore, using this isolation level, such readings are incompatible. This is also called "dirty reading." Otherwise, this isolation level works like READ COMMITTED.
You can either change the default transaction isolation level from the MySQL options file, or you can enable or disable it for a single session:
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM table_name;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
Further reading: MySQL documentation: set up a transaction
source
share