Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-304

Insufficient buffer allocation for Query_log_event

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 5.3.7
    • 5.3.8
    • None
    • None

    Description

      The query cache needs some extra space in the query string to store some
      stuff.

      But when the Query_log_event constructor allocates this space, it allocates
      QUERY_CACHE_DB_LENGTH_SIZE bytes too few (2 bytes).

      I am not sure if this is actually reproducible - it requires that a query is
      binlogged with invoker (typically for CREATE VIEW and the like) and that it
      hits the query cache (typically a SELECT). Otherwise two extra dummy bytes
      becomes available due to zero terminators for invoker not being used.

      But I will still fix the code to be at least more clear (and in case there is
      some obscure way to hit this).

      Attachments

        Activity

          knielsen Kristian Nielsen created issue -
          knielsen Kristian Nielsen made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          knielsen Kristian Nielsen made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 12114 ] MariaDB v2 [ 44813 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 44813 ] MariaDB v3 [ 64393 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 64393 ] MariaDB v4 [ 144817 ]

          People

            knielsen Kristian Nielsen
            knielsen Kristian Nielsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.