Skip to content

Allows the use of snapshot isolation level on transactions#791

Merged
bgrainger merged 10 commits into
mysql-net:masterfrom
battyejp:master
Apr 9, 2020
Merged

Allows the use of snapshot isolation level on transactions#791
bgrainger merged 10 commits into
mysql-net:masterfrom
battyejp:master

Conversation

@battyejp

Copy link
Copy Markdown
Contributor

Allows the use of using the isolation level snapshot for transactions, as per https://dev.mysql.com/doc/refman/5.7/en/commit.html

battyej added 4 commits March 27, 2020 10:07
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
{
DbConnection connection = m_connection;
m_connection.Execute(@"set global log_output = 'table';");
m_connection.Execute(@"set global general_log = 1;");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding tests for the new behaviour!

Since multiple tests can be run in parallel, is it possible that set global general_log is capturing log statements from other tests running simultaneously on other connections? You might be able to filter by thread_id to this connection's log output (using MySqlConnection.ServerThread).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip, will try it out

@battyejp battyejp Apr 9, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bgrainger Are you happy with this now the tests are passing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't see that the PR was updated and passing. Thanks for pinging me; I'll check it out soon.

Comment thread src/MySqlConnector/Core/StandardEnlistedTransaction.cs Outdated
battyej added 6 commits March 27, 2020 15:36
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
Signed-off-by: John Battye <John.Battye@ipfin.co.uk>
@bgrainger bgrainger merged commit 1144249 into mysql-net:master Apr 9, 2020
@bgrainger

Copy link
Copy Markdown
Member

Thanks for the contribution!

@bgrainger

Copy link
Copy Markdown
Member

Added in 0.63.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants