Closed dotMorten closed 4 years ago
@tannergooding Can you share the reasoning behind this commit: https://github.com/dotnet/corefx/commit/1194cdd15a91f0431c19cb2a03d5959aa698e658 ?
@keeratsingh @David-Engel @AfsanehR @saurabh500 @divega looks like a breaking change with impact on SqlClient ...
cc @tannergooding who made this change in https://github.com/dotnet/corefx/commit/1194cdd15a91f0431c19cb2a03d5959aa698e658 as part of https://github.com/dotnet/corefx/pull/22490
Brainfart! It says 'IsFinite' not 'IsInfinite' and the behavior is the same on both platforms.
Right, the resulting behavior should be the same, but using a single combined check, rather than two separate checks.
SqlDouble has a weird platform difference:
https://github.com/dotnet/corefx/blob/master/src/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs#L40
This means I can insert NaN values when not using the .NET Framework, but when running the same code on a different platform, I get a crash here. Easy to reproduce:
This is rather problematic because NaN is commonly used in the SqlGeometry and SqlGeography datatypes to represent Z and M values, where for instance a line generally contains Z measurements, but on some vertices they might not be available. The behavior is described in Microsoft SQL Server CLR Types Serialization Formats on Page 9: