Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-448

Fetching bigint data to double buffer fails for big values

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 3.1.20
    • 3.1.21
    • General
    • None

    Description

      The the conversion fails for values > 0x80000000000000(or 36028797018963968 decimal)
      SQLFetch() returns error in such case. SQLGetData() does not, but truncates the value to 0x80000000000000(or 36028797018963968). This value must be platform dependent though - the max int64 translated to double w/out truncation.
      3.2 driver does not have that problem.

      Attachments

        Activity

          Lawrin Lawrin Novitsky created issue -
          Lawrin Lawrin Novitsky made changes -
          Field Original Value New Value
          Description The the conversion fails for values > 0x80000000000000(or 36028797018963968 decimal)
          SQLFetch() returns error in such case. SQLGetData() does not, but trims the value to 0x80000000000000(or 36028797018963968)
          The the conversion fails for values > 0x80000000000000(or 36028797018963968 decimal)
          SQLFetch() returns error in such case. SQLGetData() does not, but trims the value to 0x80000000000000(or 36028797018963968)
          3.2 driver does not have that problem.

          as a matter of fact it seems like 3.1 behavior is correct, as it returns error on numeric truncation, and 3.2 should return the error too

          Lawrin Lawrin Novitsky added a comment - as a matter of fact it seems like 3.1 behavior is correct, as it returns error on numeric truncation, and 3.2 should return the error too
          julien.fritsch Julien Fritsch made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 3.1 [ 22900 ]
          Fix Version/s 3.1.21 [ 29609 ]
          Lawrin Lawrin Novitsky made changes -
          Description The the conversion fails for values > 0x80000000000000(or 36028797018963968 decimal)
          SQLFetch() returns error in such case. SQLGetData() does not, but trims the value to 0x80000000000000(or 36028797018963968)
          3.2 driver does not have that problem.
          The the conversion fails for values > 0x80000000000000(or 36028797018963968 decimal)
          SQLFetch() returns error in such case. SQLGetData() does not, but truncates the value to 0x80000000000000(or 36028797018963968). This value must be platform dependent though - the max int64 translated to double w/out truncation.
          3.2 driver does not have that problem.
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 3.1.21 [ 29609 ]
          Fix Version/s 3.1 [ 22900 ]

          After some discussions, reading specs thoroughly and looking what other drivers return in such case, we've come to conclusion that this case probably shouldn't result in error. Even though it still feels very wrong to me.

          Lawrin Lawrin Novitsky added a comment - After some discussions, reading specs thoroughly and looking what other drivers return in such case, we've come to conclusion that this case probably shouldn't result in error. Even though it still feels very wrong to me.
          Lawrin Lawrin Novitsky made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]

          People

            Lawrin Lawrin Novitsky
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.