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

SELECT fails with "Got packet bigger than 'max_allowed_packet'" on a table with longblob column with fields greater than 15MB

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Windows , MariaDB Client library for C - Rev 110

    Description

      SELECT fails with "Got packet bigger than 'max_allowed_packet'" on a table with longblob column with field greater than 17MB.

      max_allowed_packet = 50MB in the server. The same query runs successfully using MySQL C connector.

      In mthd_my_read_query_result() , net_safe_read() returns -1 after setting error 2020.

      Attachments

        Activity

          MySQL docs at http://dev.mysql.com/doc/refman/5.0/en/c-api.html states "The default maximum built into the client library is 1GB". We did not have to set client max_allowed_packet explicitly when working with Oracle's API. Do we need to set it explicitly with MariaDB API?

          Sudhindra Bhat Sudhindra Bhat added a comment - MySQL docs at http://dev.mysql.com/doc/refman/5.0/en/c-api.html states "The default maximum built into the client library is 1GB". We did not have to set client max_allowed_packet explicitly when working with Oracle's API. Do we need to set it explicitly with MariaDB API?
          Peter Laursen Peter Laursen added a comment -

          I have a comment:

          Don't confuse with the CLI that has a 16MB default for max_allowed packet
          (refer http://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html#option_mysql_max_allowed_packet).
          .. but the API has (should have) a default of 1GB for max_allowed_packet.

          If the MariaDB API does not have a default of 1 GB like the Oracle API has, it is an extremely dangerous incompatible (and undocumented, I think) change IMO. For instance a backup tool created with the API could create an incomplete backup - resulting in data loss after restore.

          Peter Laursen Peter Laursen added a comment - I have a comment: Don't confuse with the CLI that has a 16MB default for max_allowed packet (refer http://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html#option_mysql_max_allowed_packet ). .. but the API has (should have) a default of 1GB for max_allowed_packet. If the MariaDB API does not have a default of 1 GB like the Oracle API has, it is an extremely dangerous incompatible (and undocumented, I think) change IMO. For instance a backup tool created with the API could create an incomplete backup - resulting in data loss after restore.
          georg Georg Richter added a comment -

          Fxed in rev. 111

          georg Georg Richter added a comment - Fxed in rev. 111

          not fixed: rev. 111 returns error 2000.

          mthd_my_read_rows() sets CR_UNKNOWN_ERROR.

          Sudhindra Bhat Sudhindra Bhat added a comment - not fixed: rev. 111 returns error 2000. mthd_my_read_rows() sets CR_UNKNOWN_ERROR.

          People

            georg Georg Richter
            Sudhindra Bhat Sudhindra Bhat
            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.