-
Notifications
You must be signed in to change notification settings - Fork 291
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
Fix wrong data blended with transactions in .NET core #1023
Conversation
+ improvements by comparing Net fx
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlUtil.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDataReader.cs
Show resolved
Hide resolved
Is it possible to write a test case for this scenario if we can force reproduce it? |
Which part actually makes the difference? It looks like this re-enabled a commented out exception and adds an optional parameter to a function call. How does that resolve the issue, where do those changes track to and what to they cause to happen differently? |
Yes, that's the change that caused the fix. Raising that exception dooms the using connection while a transaction is aborted. |
Ok. At least I'm not missing something then. Is there any clue why that line was commented out? It's a quite important line to accidentally remove. |
I couldn't find anything; it was commented out since the very beginning (August 2018 as I found) before publishing on GitHub. 😕 cc @saurabh500 |
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs
Show resolved
Hide resolved
1de2d74
to
4ef43ef
Compare
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/TransactionTest.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/TransactionTest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/TransactionTest.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Cheena Malhotra <[email protected]>
+ 14588
root cause: The wrong data occurs when a delegated transaction completes (rollback or commit) with open result sets. In this situation, we need a new physical state object to avoid the wrong data issue.