-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Version
5.0.7
Describe the bug
Multiple call of GetPlan method throw LiteDB.LiteException : Maximum number of transactions reached
Code to Reproduce
public class Customer
{
public string Login { get; set; }
public string Name { get; set; }
}
[Fact]
public void CallGetPlanManyTimes()
{
using (var db = new LiteDatabase(":memory:"))
{
var col = db.GetCollection<Customer>("col");
col.Insert(new Customer { Name = "name1" });
col.Insert(new Customer { Name = "name2" });
for (var i = 0; i < 200; i++)
{
var query = col.Query().Where(x => x.Name == "name1");
var plan = query.GetPlan();
}
}
}
Expected behavior
No exception thrown.
Reactions are currently unavailable