Github user selvaganesang commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1311#discussion_r159498302
--- Diff: win-odbc64/odbcclient/drvr35/sqltocconv.cpp ---
@@ -2278,7 +2316,9 @@ unsigned long ODBC::ConvertSQLToC(SQLINTEGER
ODBCAppVersion,
if (srcPrecision > 0)
{
// SQL returns fraction of a second
which has to be converted to nano seconds
- dTmp =
(*(UDWORD*)SQLTimestamp->fraction * 1000000000.0) / pow(10,srcPrecision);
+ dTmp =
(*(UDWORD*)SQLTimestamp->fraction * 1000000000.0) /
pow(10,srcPrecision,&retCode);
+ if (retCode == IDS_22_003)
--- End diff --
Please consider checking the retCode before using it to divide in line 2319
---