Page 1 of 1

Changing Transaction isolation level

Posted: Thu 13 May 2010 21:30
by mcaselli
Dear support team,
I use devart dotconnect for mysql 5.70.120.

I using DevArt Linq to SQL model.

The DB is MySQL 5.1.x installed on windows server 2008 32 bit.

I have encountered this problem:
===
InnerException = {"Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'"}
===

This occur when i try to update an changed object (_model.SubmitChanges):

Code: Select all

public bool UpdateCustomHasAmbiente(cam_has_amb chaToUpdate)
        {
            bool addResult = true;
            try
            {
                
                _model.SubmitChanges();
//                _model.SaveChanges();
            }
            catch (Exception e)
            {
                addResult = false;
            }

            return addResult;
        }
I try to change the isolation level of transaction but i don't find the correct sintax or don't work fine.

Best regards.
Max
P.S. * _model is the context.

Posted: Wed 09 Jun 2010 16:13
by AndreyR
This error arises in case when Binary Logging mode is set to STATEMENT and a transaction is started with isolation level set to READ COMMITTED. This isolation level is necessary for LINQ to SQL internal tranasctions.
So, the solution is to set the binary logging to "ROW" or "MIXED", like it is described here.