MySQL Workbench and default session isolation level

I have a problem with MySQL workbench 6.0 CE, I will describe it the most explained:

MySQL Workbench always sets my session variable @@tx_isolation

to "REPEATABLE READ"

, and the only way to change this variable is to use SET tx_isolation='READ-COMMITTED';

.

I want to start with the default workbench session variable for tx_isolation

was 'READ-COMMITTED'

, instead 'REPEATABLE-READ'

; yes, I changed the global variable tx_isolation

and she 'READ-COMMITTED'

, but the first session didn't.

Ej:

SELECT @@Global.tx_isolation, @@tx_isolation;

      

returns: 'READ-COMMITTED'

, 'REPEATABLE-READ'

respectively.

Note. ... If I ask for the same code above on the MySQL command line, both variables are set to 'READ-COMMITTED'

, so I think this is a problem with MySQL Workbench and not with the server.

Thanks for the help.

+2


source to share


1 answer


This is an old question, but I have the same error.

According to the doc ( https://dev.mysql.com/doc/refman/5.7/en/innodb-transaction-isolation-levels.html#isolevel_repeatable-read ) the default isolation level is REPEATABLE-READ.

This means that the database snapshot is taken the first time a FIRST transaction is viewed. Everyone else who reads this transaction will show you the snapshot data.

So, you need to complete the transaction (commit or rollback) to get a new snapshot on next read.



My colleagues who set MySQL Workbench to AutoCommit do not see re-readable behavior. We figured this out because after each SELECT the transaction is closed and a new snapshot is created.

So, since the bug is still not fixed (as mentioned in Sithsu), a workaround would be the following:

  • switch to auto-message to take new pictures
  • or commit / rollback after each SELECT to create a new snapshot
0


source







All Articles