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

Do not limit setting session parameters in session_cmd_history (Optimize session history)

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Do
    • None
    • N/A
    • N/A
    • None

    Description

      Hi,

      due to recently found memory leaks, a new parameter to limit (or disable) the session variables history has been set.

      I think it could be easily improved, by distinguishing session parameters and session variables.
      Most of the applications do set session parameters (such as join_buffer_size by ex)
      For such parameters, if a user sets it many times (example...) :
      set session join_buffer_size=32*1024*1024;
      set session join_buffer_size=64*1024*1024;
      set session join_buffer_size=32*1024*1024;
      set session join_buffer_size=64*1024*1024;
      We don't need to store all previous values, but only the last one.

      MySQL/Maria allows you to set maybe up to 400 different session parameters. It could be easy to store them in an array, and keep them forever, without leaking too much memory.

      On the contrary, I agree that setting user defined variables, such as:
      SET @myvarA = NOW();
      SET @myvarB = NOW();
      SET @myvarC = NOW();
      could and should be limited in terms of size.

      I don't know what other session things that are kept in this "session cmd history", but they could go to any of the mentionned groups above.

      What do you think?
      Thanks,
      Joffrey

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              joffrey Joffrey MICHAIE (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.