[ 
https://issues.apache.org/jira/browse/TRAFODION-2750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16181945#comment-16181945
 ] 

ASF GitHub Bot commented on TRAFODION-2750:
-------------------------------------------

Github user selvaganesang commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafodion/pull/1241#discussion_r141240746
  
    --- Diff: core/conn/unixodbc/odbc/odbcclient/unixcli/cli/ctosqlconv.cpp ---
    @@ -3545,7 +3545,7 @@ unsigned long ODBC::ConvertCharToNumeric(SQLPOINTER 
srcDataPtr,
         rTrim(cTmpBuf);
         tempLen = strlen(cTmpBuf);
         errno = 0;
    -   dTmp = strtod(cTmpBuf, &errorCharPtr);
    +   dTmp = strtold(cTmpBuf, &errorCharPtr);
    --- End diff --
    
    Thanks Dave. In that case, this change looks good to me


> Using function strtod is not enough to convert C_CHAR to DOUBLE
> ---------------------------------------------------------------
>
>                 Key: TRAFODION-2750
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2750
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: client-odbc-linux
>    Affects Versions: 2.2-incubating, 2.3-incubating
>         Environment: centos6.7
>            Reporter: XuWeixin
>             Fix For: 2.2-incubating
>
>
> client app with odbc driver :
> insert c_char "-2.22507e-308";  to double
> State: 22003
>    Native Error: 0
>    Error: [Trafodion ODBC Driver] NUMERIC VALUE OUT OF RANGE. Incorrect 
> Format or Data. Row: 1 Column: 1
> unit test for driver code :
> char buffer[] = "-2.22507e-308";
> double db;
> errno = 0;
> db = strtod(buffer,NULL);
> return db = -0.000000
>           errno = 34



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to