Page 1 of 1
MySQL - Change Default Isolation Level?
Posted: Mon 26 Mar 2012 18:00
by lmcnearney
Is it possible to change the default isolation level that the DataContext uses when internally handling transactions with .SubmitChanges()? We're running into the InnoDB binary logging format issues and would prefer to just change the default isolation level instead of manually wrapping all of our code in TransactionScope's/transactions.
Posted: Tue 27 Mar 2012 09:28
by MariiaI
Currently there is no way to change the default isolation level of implicit transactions. However, thank you for the suggestion.
We will consider adding such an option and notify you about the results as soon as possible.
Posted: Thu 29 Mar 2012 13:49
by Zero-G.
Hey
I am not sure, but maybe you can use a little kind of hack for this.
You can set the isolation level in a very early situation.
For example, after you create the Context. - Than after the creation, you can run an
Set Transaction Isolated Level
command
like this.
Code: Select all
Dim myDataContext As New DataContext
myDataContext.ExecuteQuery("Set Transaction Isolation Level READ COMMITTED")
After this, the Isolation Level for the complete user connection should be established.
So, this you could try. - Maybe it helps.
Have a nice day
Posted: Thu 29 Mar 2012 18:20
by lmcnearney
Zero-G. wrote:
You can set the isolation level in a very early situation...
Thanks for the suggestion but we've attempted that. It changes the isolation level back later on internally when you call .SubmitChanges().