Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-584

fetching timy values above 127 returns. MYSQL_DATA_TRUNCATED

    XMLWordPrintable

Details

    Description

      mysql_stmt_fetch() returns MYSQL_DATA_TRUNCATED when fetching TINYINT UNSiGNED from DB with values above 127. Fetched values seem nevertheless to be correct in range 0 to 255.

      Consecutive fetches return return-code of 1st fetch, regardless of read value.
      Latter observation not verified.

      attached test produces:
      for i in 1 2 3 4 9 ; do ./a.out $i ; done
      id 1: tiny 127
      id 2: data truncated --> id 2: tiny 128
      id 3: tiny 32
      id 4: data truncated --> id 4: tiny 192
      id 9: no data --> id 9: tiny 0

      Attachments

        1. table.sql
          0.3 kB
        2. tinyerr.c
          3 kB

        Activity

          People

            georg Georg Richter
            mabmdb Andreas Banf
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.