trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] trafodion pull request #1311: [TRAFODION-2818] For Server 2008, function pow...
Date Fri, 05 Jan 2018 15:19:20 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1311#discussion_r159900101
  
    --- 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 --
    
    There are many instances like this looking for retCode after dividing. You might want
to refactor in all those instances. 


---

Mime
View raw message