Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1333

Add maxAllowedPacket connection option (send/receive limit)

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.5.10
    • security
    • None

    Description

      Today the connector has no client-side control over packet size: the handshake max_packet_size field is hardcoded to 1 GB, and the outgoing/incoming limits are driven only by the server's max_allowed_packet.

      Add a maxAllowedPacket connection option that:

      • caps the maximum size of packets the driver will send;
      • caps the maximum size of packets the driver will accept when reading.

      Received packets are size-checked in two phases:

      • Before authentication: a fixed 1 Mb cap.
      • After authentication:
        • if maxAllowedPacket is set, then that value is honored
        • if unset, then a server-independent heap-relative ceiling: a quarter of the JVM max heap, clamped between 16 Mb and 1 Gb.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            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.