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

config upgrade helper tool

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      A tool that helps to adjust config files after MariaDB is upgraded.

      It can list all options that are no longer recognized by the server, suggest replacements, if any.
      It could also edit files in place (when requested), removing, commenting out, or adding loose- prefix to such options.

      Also it could check for invalid values of enum/set variables.

      To parse all files it could use my_print_defaults, the list of supported options could be hard-coded or extracted from mariadbd --help and such.

      perl/python or C/C++ ? C or C++ is probably more portable for windows.

      For code how to parse options like !include, check mysys/my_defaults.c

      Suggested options:

      • No options: List unknown server options on stdout (those that would prevent the server from starting).
      • --update
        • Update the my.cnf file in place (and all files included with !include or !includedir)
      • --backup
        • Store modified files as backup (for example my.cnf-backup)
      • --current-version=... (for example --current-version=mysqld-5.7)
        • Section to use for unknown options, see --mode
          • The purpose of --current-version is to enable the tool to create a config file that will work for both MySQL and MariaDB at
            the same time. In this case, options that works for both MySQL and MariaDB should use the section [mysqld]. MySQL unique options should be under [mysqld-5.7] and MariaDB specific options
            would be under [mariadbd].
      • --edit=...
        • Select what to do with unknown options. List of suggested mode options:
          • remove Remove unoption
          • comment Add # before option
          • inline-old-version Add ['current-version'] before the option and [mysqld] afterwards. 'curent-version' is the tag specified with --current-version=...
          • last-old-version Move all unknown version last in the file with [old-version] before.
      • --print
        • Print converted file on stdout. In this case all !include and !includedir files should be included.

      We need both inline- and last- as some options may depend on their place in the config file.

      The tool should also be prepared for special handling of some specific options.

      Note that MariaDB don't have the audit_log plugin (Percona Server).
      Instead MariaDB has a server_audit plugin which takes different options.
      If the tool notice that 'audit_plugin' is used, it should suggest one to use the server_audit plugin instead.

      --plugin-load=QUERY_RESPONSE_TIME_READ=query_response_time.so;QUERY_RESPONSE_TIME_WRITE=query_response_time.so
      This is only supported in MariaDB 10.11 and above. If used with an earlier MariaDB version it would be good to get a note that this is supported in 10.11.6 and above.

      As a reference, here are some common config options found in Percona server that is not in MariaDB:
      [mysqld-5.7]
      --binlog-ignore-db=information_schema
      --innodb_log_files_in_group=2
      --innodb_buffer_pool_instances=3
      --max_binlog_files=14
      --log_slow_rate_type=query
      --slow_query_log_always_write_time=0.5
      --slow_query_log_use_global_control=all
      --plugin-load=audit_log.so

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.