trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weixin-Xu <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #1241: [TRAFODION-2750] Using function strt...
Date Wed, 20 Sep 2017 07:00:49 GMT
GitHub user Weixin-Xu opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1241

    [TRAFODION-2750] Using function strtod is not enough to convert C_CHAR to DOUBLE

    client app with odbc driver :
    DDL : "CREATE TABLE DOUBLE_TEST(A DOUBLE PRECISION)"
    buffer =   "-2.22507e-308"
    Bind SQL_C_CHAR to SQL_DOUBLE
    return :
    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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Weixin-Xu/incubator-trafodion master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1241.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1241
    
----
commit 693a3ceda4c818caf3735dffd763a616b533d2af
Author: Weixin-Xu <xwx@weixin-1.novalocal>
Date:   2017-09-20T06:24:42Z

    strtod is not enough to convert char to double with numbers like "-2.22507e-308"

----


---

Mime
View raw message