Wen Jun Wen Jun - 10 months ago 66
MySQL Question

Set transaction isolation level of mysql

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 Source
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.