Skip to content

Refactoring query executor to ensure that transaction is released#2024

Open
gzatravkin wants to merge 1 commit intolitedb-org:masterfrom
StrangeLoopGames:refactoring_query
Open

Refactoring query executor to ensure that transaction is released#2024
gzatravkin wants to merge 1 commit intolitedb-org:masterfrom
StrangeLoopGames:refactoring_query

Conversation

@gzatravkin
Copy link
Copy Markdown

It removes some duplications and fixes the problem that when you are using
query.Select(...).FirstOrDefault() won't release the transaction, and eventually, it will lead to a crash when trying to enter exclusive mode.

It was happening because it wasn't advancing after
yield return _query.Select.ExecuteScalar(_pragmas.Collation).AsDocument;

Now releases the transaction inside of finally block, which will be called with Dispose method

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant