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

Problems with prepared statements with more than 2^16 columns

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.8
    • Component/s: Core
    • Labels:
      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

            Assignee:
            markus makela markus makela
            Reporter:
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration