MySQL Forums
Forum List  »  General

Commit setting transaction isolation level
Posted by: Torben Koch
Date: January 23, 2018 07:45AM

Hey everybody,
I work with MySQL Workbench and I do some testing, which include setting the transaction isolation level and demonstrating dirty read, etc.
Before I start the execution of the transaction I am setting the transaction isolation level like the following example shows.

SET GLOBAL TRANSACTION ISOLATION LEVEL repeatable read;
SET SESSION TRANSACTION ISOLATION LEVEL repeatable read;
SET autocommit=0;

START TRANSACTION;
SELECT * FROM person;
COMMIT;

When I execute the transaction the first time after I change the transaction isolation level it often executes the transaction with the level which it used before. In the second run it uses the new transaction isolation level.

Do I need to commit the change of the transaction isolation level or what am I doing wrong?

Salute,
Torben

Options: ReplyQuote


Subject
Written By
Posted
Commit setting transaction isolation level
January 23, 2018 07:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.