[
https://issues.apache.org/jira/browse/TRAFODION-2818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16311838#comment-16311838
]
ASF GitHub Bot commented on TRAFODION-2818:
-------------------------------------------
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
> For Server 2008, function pow() in driver ODBC throws
> STATUS_ILLEGAL_INSTRUCTION
> --------------------------------------------------------------------------------
>
> Key: TRAFODION-2818
> URL: https://issues.apache.org/jira/browse/TRAFODION-2818
> Project: Apache Trafodion
> Issue Type: Bug
> Components: client-odbc-windows
> Affects Versions: any
> Environment: Server 2008 R2
> Reporter: XuWeixin
> Assignee: XuWeixin
> Fix For: any
>
>
> SQL_NUMERIC to SQL_C_CHAR
> ***ERROR: SQLGetData: Expected: SQL_SUCCESS Actual: SQL_ERROR
> State: HY000
> Native Error: 29
> Error: [TRAF][Trafodion ODBC Driver] General error.EXCEPTION: UNKNOWN -
> Exception Code = c000001d
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)