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

Fix null binary rowversion and add test coverage #1688

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

Wraith2
Copy link
Contributor

@Wraith2 Wraith2 commented Jul 29, 2022

fixes #1684

The fix is very simple and simply adds a a null check that was already present in all the other SqlType returning properties on SqlBuffer. Test coverage is added for SqlBinary and SqlBytes in the existing test.

/cc @rclabo, @dbrownems

@codecov
Copy link

codecov bot commented Jul 30, 2022

Codecov Report

Merging #1688 (2a5a80f) into main (9b1996a) will decrease coverage by 1.18%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1688      +/-   ##
==========================================
- Coverage   71.40%   70.22%   -1.19%     
==========================================
  Files         295      293       -2     
  Lines       61195    61384     +189     
==========================================
- Hits        43697    43106     -591     
- Misses      17498    18278     +780     
Flag Coverage Δ
addons 92.38% <ø> (ø)
netcore 73.56% <100.00%> (-1.40%) ⬇️
netfx 68.15% <100.00%> (-1.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...qlClient/src/Microsoft/Data/SqlClient/SqlBuffer.cs 80.11% <100.00%> (+0.07%) ⬆️
...ta/SqlClient/SqlDelegatedTransaction.NetCoreApp.cs 0.00% <0.00%> (-100.00%) ⬇️
...soft/Data/SqlClient/SqlAuthenticationParameters.cs 0.00% <0.00%> (-88.89%) ⬇️
...Microsoft/Data/SqlClient/SqlAuthenticationToken.cs 0.00% <0.00%> (-83.34%) ⬇️
...erBase/DbConnectionPoolAuthenticationContextKey.cs 0.00% <0.00%> (-63.16%) ⬇️
...rosoft/Data/SqlClient/SqlAuthenticationProvider.cs 50.00% <0.00%> (-50.00%) ⬇️
...SqlClient/ActiveDirectoryAuthenticationProvider.cs 10.90% <0.00%> (-49.77%) ⬇️
...core/src/Microsoft/Data/SqlClient/SNI/SNIHandle.cs 42.10% <0.00%> (-45.40%) ⬇️
...viderBase/DbConnectionPoolAuthenticationContext.cs 0.00% <0.00%> (-41.67%) ⬇️
...ActiveDirectoryAuthenticationTimeoutRetryHelper.cs 47.72% <0.00%> (-15.91%) ⬇️
... and 61 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Wraith2
Copy link
Contributor Author

Wraith2 commented Jul 30, 2022

It looks like the test CI is just broken.

@JRahnama JRahnama added this to the 5.0.0 milestone Aug 2, 2022
@David-Engel David-Engel merged commit e42e388 into dotnet:main Aug 4, 2022
@Wraith2 Wraith2 deleted the fix-sqlbinary-nre branch August 4, 2022 07:37
@rclabo
Copy link

rclabo commented Aug 4, 2022

It's very impressive to see this issue get fixed so quickly. I reported this bug 8 days ago and the fix is already merged into dotnet:main. This truly shows the power of open source and the direct interaction it brings between Microsoft and it's community of developers. Big shout out to @Wraith2 for fixing this so quickly. Impressed.

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.

GetSqlBinary fails with NRE on null rowversion
6 participants