Skip to content

It is not possible to create two commands in parallel if they are assigned to one connection #867

@BoBiene

Description

@BoBiene
 MySqlConnection connection = new MySqlConnection(/* ... */);
connection.Open(); ;

var cmd1 = connection.CreateCommand();
cmd1.CommandText = "SELECT 1";
using (var reader = cmd1.ExecuteReader())
{
    var cmd2 = connection.CreateCommand();
    cmd2.CommandText = "SELECT 1";  //should not fail

    //cmd2.Execute[..]() <- should fail
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions