Skip to content

Cannot use transaction after commit #333

@bgrainger

Description

@bgrainger

Connector/NET allows the following code:

var connection = new MySqlConnection("connection string");
connection.Open();
var transaction = conn.BeginTransaction();
conn.Query<int>("select 1;", transaction: transaction); // using Dapper
transaction.Commit();
conn.Query<int>("select 1;", transaction: transaction);

MySqlConnector throws an InvalidOperationException: The transaction associated with this command is not the connection's active transaction. on the last line.

See #331 for a similar incompatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions