-
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 | TDS RPC error on large queries in SqlCommand.ExecuteReaderAsync #1936
Conversation
… to the extra bytes written in TDS Packet during async reader
Looks like a simple fix to a hard to investigate problem. 👍 |
Indeed, the fix was simple but took a long time to get proper environment and repro case, and apparently it happened in all versions of Microsoft.Data.SqlClient including 1.0 but somehow was still working on System.Data.SqlClient. |
/azurepipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1936 +/- ##
==========================================
- Coverage 70.82% 70.46% -0.36%
==========================================
Files 292 306 +14
Lines 61777 61563 -214
==========================================
- Hits 43752 43380 -372
- Misses 18025 18183 +158
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 54 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/ApiShould.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: DavoudEshtehari <61173489+DavoudEshtehari@users.noreply.github.com>
We found bug when using always encrypted with a large query with at least a parameter in async, it would insert extra bytes into the TDS packet header for the enclave byte per parameter when run in async mode resulting in the following error:
It turns out it was fixed in .NET Core but broken in .NET Framework, so after I backport changes i.e. move the logic of adding the enclave byte from once per parameter to once per rpc call, it seems to fix the issue.