Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: retry DML with THEN RETURN in transactions #446

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

olavloite
Copy link
Collaborator

DML statements with a THEN RETURN clause need to be executed using the ExecuteReader method. These were normally not executed in a retry loop, as they were up until now only used for queries. Queries are executed during the first call to Reader#Read(), which meant that a retry loop was not needed for calls to ExecuteReader. DML statements with a THEN RETURN clause are executed directly, and therefore need a retry loop.

This fix adds a retry loop for that, and tests for DML statements with a THEN RETURN clause.

DML statements with a THEN RETURN clause need to be executed using the
ExecuteReader method. These were normally not executed in a retry loop,
as they were up until now only used for queries. Queries are executed
during the first call to Reader#Read(), which meant that a retry loop
was not needed for calls to ExecuteReader. DML statements with a THEN
RETURN clause are executed directly, and therefore need a retry loop.

This fix adds a retry loop for that, and tests for DML statements with
a THEN RETURN clause.
@olavloite olavloite merged commit 7679d6f into main Oct 2, 2024
8 checks passed
@olavloite olavloite deleted the correctly-retry-dml-then-return branch October 2, 2024 09:13
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