Avatar of Robert Silver
Robert SilverFlag for United States of America asked on

HOW IS TRANSACTION ISOLATION LEVEL SET VS SESSION.tx_isolation?

This is a basic question or so I believe!

Where and how do you set a current transaction isolation setting
I checked @@session.tx_isoation an @@tx_isolation are the same

so what variable or sql command sequence  sets things such that it is either transaction specific to a specific transaction or the default for just begin end transactions???

there is supposed to be three different setting but I found only 2 so far: session and global
MySQL Server

Avatar of undefined
Last Comment
Robert Silver

8/22/2022 - Mon
Steve Wales

(oops, ignore me, I gave you MSSQL advice, removing my comment, sorry about that)

However, in case you hadn't found it, since I've got a comment stuck here anyway, here's the link to the docs on isolation level for MySQL.

http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html
ASKER
Robert Silver

I know not much help I need specifics not given at your link
Steve Wales

Sorry can't help you ... I don't know much about MySQL, mis-read it as MSSQL and replied based on that :-/
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER
Robert Silver

This question may not have an easy answer or even be so relevant.
I had heard  of this setting and wish to know how it is set that is all
ASKER
Robert Silver

Perhaps the real answer here is the session becomes specific to a given Transaction given
it is within the same session but then why make the distinction?
Was that just a mistake that was made and there is no such setting at all?
That would be my current  thoughts on this?
With Multi-threading it just occurred to me that maybe I could set off one transaction or multiple transactions within the same session but I guess that is not possible given the response here

Anyone like to comment on that?
Mark Wills

If I understand your question properly... You are correct, there are three.

The basic syntax is :
mysql> SET <extent> TRANSACTION ISOLATION LEVEL <level>;

You must specify the extent as being GLOBAL or SESSION and if neither keyword is mentioned, then it is for the next (unstarted) transaction only.

There are 4 levels (in sequence of increasing guaranteed integrity) :
READ UNCOMMITTED
READ COMMITTED
REPEATABLE READ
SERIALIZABLE

The  REPEATABLE READ level is the default...
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Mark Wills

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Robert Silver

I've requested that this question be deleted for the following reason:

No interest
Mark Wills

Interesting to say "no interest"

There was an example given of how to set and test for current transaction, and previously, the three different methods used to set the isolation level... being Global or Session and if neither of those two keywords are mentioned, then it is Transaction.
ASKER
Robert Silver

I've requested that this question be deleted for the following reason:

No decent answer or interest
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck