Setting transaction isolation level of MySQL

Wen Jun picture Wen Jun · Oct 29, 2011 · Viewed 50.2k times · Source

How do I set the isolation level of MySQL 5.1 InnoDB?

By entering:

mysql> show variables like '%isola%';

The default level set for InnoDB is repeatable read.
How do I change the isolation level?

Answer

Niet the Dark Absol picture Niet the Dark Absol · Oct 29, 2011
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

SESSION is optional, just limits the setting to the current session.
READ UNCOMMITTED is to be replaced with your desired level.