You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "XuWeixin (JIRA)" <ji...@apache.org> on 2017/09/20 06:56:00 UTC

[jira] [Created] (TRAFODION-2750) Using function strtod is not enough to convert C_CHAR to DOUBLE

XuWeixin created TRAFODION-2750:
-----------------------------------

             Summary: 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)