MySql.Data version 8.0.31 doesn't set right isolation level
Posted by: Aniruddha Prasad
Date: October 20, 2022 05:48PM

When using MySql.Data version 8.0.31 with .Net 6.0, when the isolation level is set for a command, the command is executed at the default isolation level.

The sample below demonstrates the issue:

public void TestBuggyIso()
var connection = new MySqlConnection(ConnectionString);
var transaction = connection.BeginTransaction(System.Data.IsolationLevel.Serializable);
MySqlCommand command = new("SELECT @@transaction_isolation;", connection, transaction);
var reader = command.ExecuteReader();
while (reader.Read())
string value = reader.GetString(0);
Assert.AreEqual(value, "SERIALIZABLE");

Here the isolation level should be Serializable but I see that the isolation level is set to REPEATABLE-READ.

Options: ReplyQuote

Written By
MySql.Data version 8.0.31 doesn't set right isolation level
October 20, 2022 05:48PM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.