Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2725

SQL types are REAL, FLOAT, and DOUBLE. Some values are inserted, a stack overflow occurs when SQLGetData is executed.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • client-odbc-windows
    • None

    Description

      The inserted value is -2.22507e-308, and the SQLGetData receive buffer is greater than 256,when the double column data is fetched, the program sends a crash.
      example:
      TCHAR tempbuf[256] =

      {0}

      ;
      SQLExecDirect(hstmt, (SQLTCHAR*)"CREATE TABLE TB_DOUBLE (ID INT, C DOUBLE PRECISION)", SQL_NTS);
      SQLExecDirect(hstmt, (SQLTCHAR*)"INSERT INTO TB_DOUBLE VALUES (1,-2.22507e-308)", SQL_NTS);
      SQLExecDirect(hstmt, (SQLTCHAR*)"SELECT * FROM TB_DOUBLE", SQL_NTS);
      SQLNumResultCols(hstmt, &numOfCols);
      SQLFetch(hstmt);
      for(i = 1; i <= numOfCols; i++){
      SQLGetData(hstmt,(SWORD)i,SQL_C_CHAR,tempbuf,sizeof(tempbuf),&len);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sujinpei 苏锦佩
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: