Open bbigras opened 2 years ago
Hey! I'm currently reading the TDS manual, and SQL Server TDS protocol should support IEEE 754 floating point values. We do set the server to use the standard in the login message, but when we try to convert a f64::NAN
to bytes, the server does not accept the value as a valid floating point. It's kind of tricky to find any good information about the protocol for floats, and the manual doesn't mention NaN values at all... The best I could find is some MSDN discussion where a user wants to store NaN values and has trouble with it:
For your question, if the server allows NaN, Infinity and -Infinity, we should for sure support it in Tiberius too. If this is the case, we should find out do they have some special non-standard encoding in the protocol we should implement. The standard IEEE 754 encoding does not seem to work for the special values.
I got some f64::NAN from a source I don't control.
I got some errors when inserting into a decimal(19, 4) (null allowed) column.
error:
I have no idea how other SQL crates handle this.
Should tiberius handle NaN?