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

When performing a query with an aggregate function such as Count or Sum from MSAccess, an error is returned

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.5
    • 2.0.17, 3.0.6
    • General
    • None
    • Windows 7 Professional 64 bit. MS Access 2010 32 bit

    Description

      When running the following query:
      SELECT Count(tblContacts.contactID) AS CountOfcontactID, tblContacts.firstName
      FROM tblContacts
      GROUP BY tblContacts.firstName

      The error returned is:
      "The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data."

      The error is is returned using Count, Sum, Avg, StDev and Var. But not when using Min, Max, First or Last.

      This error is not generated if using the MySQL ODBC connector to connect to the same database.

      connector log attached.

      Attachments

        Activity

          immortal Martin Lane created issue -
          Lawrin Lawrin Novitsky made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10101 ]

          Thank you for your report.
          I could repeat the issue. However it's very strange. I can see nothing in the trace, that could cause the error

          Lawrin Lawrin Novitsky added a comment - Thank you for your report. I could repeat the issue. However it's very strange. I can see nothing in the trace, that could cause the error

          Commit 91f7d86 in odbc-3.0/master

          Lawrin Lawrin Novitsky added a comment - Commit 91f7d86 in odbc-3.0/master
          Lawrin Lawrin Novitsky made changes -
          Component/s General [ 14302 ]
          Fix Version/s 3.0.6 [ 23133 ]
          Fix Version/s 2.0.17 [ 23002 ]
          Resolution Fixed [ 1 ]
          Status Confirmed [ 10101 ] Closed [ 6 ]

          Those aggregate functions, that caused error, return LONGLONG value, and Access was getting it as SQL_C_LONG. The problem was that connector returned length of the data as 8(field's size), and not 4(requested C-type size), as specs prescribe.

          Lawrin Lawrin Novitsky added a comment - Those aggregate functions, that caused error, return LONGLONG value, and Access was getting it as SQL_C_LONG. The problem was that connector returned length of the data as 8(field's size), and not 4(requested C-type size), as specs prescribe.
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 88337 ] MariaDB v4 [ 135472 ]

          People

            Lawrin Lawrin Novitsky
            immortal Martin Lane
            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.