forked from xerial/sqlite-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid double precision in getBigDecimal
If a column has the real type affinity and the value can be represented with the limited accuracy of a double, the function safeGetColumnType(checkCol(col)) evalutes to SQLITE_FLOAT. Getting the value using safeGetDoubleCol(col) causes an implicit conversion to a double. Since version 3.43.0 the sqlite source doesn't round the value anymore, but returned the value including the 8-byte IEEE floating point number inaccuracies. Somehow different operating systems behave differently. This explains, why the test only failed on Windows. Using safeGetColumnText(col) avoids this lossy conversion. Closes: xerial#1002 Co-authored-by: Gauthier Roebroeck <gauthier.roebroeck@gmail.com>
- Loading branch information
Showing
2 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters