Fix bug with LegacyRowVersionNullBehavior#1182
Conversation
|
Can you add the covering tests the user provided please. |
|
What should the new behaviour be for |
Addressed that too. |
|
Ok, I'm fine with returning null for NULL there, just wondering singl ei was converting the new tests for the current behaviour to make sure it was well defined. I think I prefer my goto fix code better but I'm fine with approving this version if you prefer it. |
I decided to revert this back to throw exception - as ideally this is "expected" with the breaking change we have when
I don't mind yours either, the one I have now is a less impactful and less complex to understand.. I'll leave it as is. |
|
My only complaint is that the goto version avoids checking the same variable twice. On each path you only check what is needed. In the if-based construction you have to access the legacy switch twice and use isnull twice. If you and the team prefer this version for code clarity that's ok though. |
|
LGTM, plus I liked the approach to C# 9's new features. |
DavoudEshtehari
left a comment
There was a problem hiding this comment.
Could you extend the tests and include Timestamp too?
Timestamp is already included when we run this query in tests: I'll take care of other improvements. |
Backporting dotnet#1182 for 3.0.1-servicing
|
Should this be considered for backporting to 3.0.1? |
|
@roji most important if 3.0 is LTS, I guess? |
|
@ErikEJ I think it isn't though, no? Isn't 4.0 the LTS? |
|
This is one of the candidates for backporting to 3.0.1. |
* Fix Async thread blocking on SqlConnection open for AAD modes Backporting #1182 for 3.0.1-servicing * Adding missed TdsParser.cs from Bacporting 1182 issue.
Fixes #1175 as reported.