Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3395

Problems with prepared statements with more than 2^16 columns

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.5.8
    • Core
    • None

    Description

      The binary protocol stores the column and parameter counts in a 16-bit unsigned integer. One would assume that prepared statements that have more columns or parameters than that would fail but the server allows them to be prepared. What this means is that the column and parameter counts cannot be trusted and the only way to know when a prepared statement ends is to count the EOF packets.

      The current method in MaxScale counts the total number of packets expected after the initial OK packet for the COM_STMT_PREPARE. This won't work due to the aforementioned problems in the protocol. The fix to this is to count how many EOF packets are expected and count those.

      Attachments

        Activity

          People

            markus makela markus makela
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.