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

Support "autoset" in SET GLOBAL for AUTO_SET system variables

    XMLWordPrintable

Details

    Description

      Some system variables are declared as AUTO_SET, and some of those also support being changed dynamically with SET GLOBAL.

      For example, host_cache_size is declared as AUTO_SET:

      https://github.com/MariaDB/server/blob/mariadb-10.4.6/sql/sys_vars.cc#L5795

      But "autoset" doesn't work with SET GLOBAL:

      MariaDB [(none)]> SET GLOBAL host_cache_size=autoset;
      ERROR 1232 (42000): Incorrect argument type to variable 'host_cache_size'

      There is special code to handle auto-sizing for this system variable (and others) at startup:

      https://github.com/MariaDB/server/blob/mariadb-10.4.6/sql/mysqld.cc#L4266

      And you can explicitly specify to autoset the AUTO_SET option by using the --autoset option prefix:

      https://mariadb.com/kb/en/library/mysqld-options/#-autoset-

      For example:

      [mariadb]
      ...
      autoset_host_cache_size

      Maybe it would make sense to be able to specify the "autoset" value in SET GLOBAL for variables that are declared AUTO_SET?

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.