HOW IS TRANSACTION ISOLATION LEVEL SET VS SESSION.tx_isolation?

Robert Silver
Robert Silver used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Steve WalesSenior Database Administrator

Commented:
(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
Robert SilverSr. Software Engineer

Author

Commented:
I know not much help I need specifics not given at your link
Steve WalesSenior Database Administrator

Commented:
Sorry can't help you ... I don't know much about MySQL, mis-read it as MSSQL and replied based on that :-/
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Robert SilverSr. Software Engineer

Author

Commented:
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
Robert SilverSr. Software Engineer

Author

Commented:
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 WillsTopic Advisor, Page Editor
Distinguished Expert 2018

Commented:
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...
Topic Advisor, Page Editor
Distinguished Expert 2018
Commented:
Found an example for you at the transaction level and the results / outcomes between two sessions...

http://dba.fyicenter.com/faq/mysql/Change-Transaction-Isolation-Level.html
Robert SilverSr. Software Engineer

Author

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

No interest
Mark WillsTopic Advisor, Page Editor
Distinguished Expert 2018

Commented:
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.
Robert SilverSr. Software Engineer

Author

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

No decent answer or interest

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial