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

Presentation of aliases in `mariadbd --verbose --help` is highly redundant

Details

    Description

      There are many mariadbd command-line options and system variables which have aliases or alternate names:

      In some cases (e.g. --old-alter-table vs. --alter-algorithm), some of the names are deprecated.

      In other cases (e.g. --tmp-memory-table-size vs. --tmp-table-size), there's no clear distinction in terms of deprecation/preference.

      In all cases, the options/variable are listed multiple times in the mariadb --verbose --help output, with:

      • Almost entirely redundant content.
      • No consistent way in which the aliases or other names are presented.

      In order to simplify the documentation, it would be beneficial to combine the listing of these options in the verbose help text.

      Examples of how options with multiple names are shown now

      $ mariadbd --verbose --help
        ...
        --alter-algorithm[=name] 
                            Specify the alter table algorithm. One of: DEFAULT, COPY,
                            INPLACE, NOCOPY, INSTANT
        --old-alter-table[=name] 
                            Alias for alter_algorithm. Deprecated. Use
                            --alter-algorithm instead.. One of: DEFAULT, COPY, 
                            INPLACE, NOCOPY, INSTANT
        ...
        --tmp-memory-table-size=# 
                            If an internal in-memory temporary table exceeds this
                            size, MariaDB will automatically convert it to an on-disk
                            MyISAM or Aria table. Same as tmp_table_size.
        --tmp-table-size=#  Alias for tmp_memory_table_size. If an internal in-memory
                            temporary table exceeds this size, MariaDB will
                            automatically convert it to an on-disk MyISAM or Aria
                            table.
      

      How these should be shown

      This format will considerably shorten the verbose help output, enable users to quickly recognize aliases, and identify which of those aliases are deprecated.

      $ mariadbd --verbose --help
        ...
        --alter-algorithm[=name] 
        --old-alter-table[=name]    (Deprecated)
                            Specify the alter table algorithm. One of: DEFAULT, COPY,
                            INPLACE, NOCOPY, INSTANT
        --tmp-memory-table-size=# 
        --tmp-table-size=#
                            If an internal in-memory temporary table exceeds this
                            size, MariaDB will automatically convert it to an on-disk
                            MyISAM or Aria table.
      

      Attachments

        1. a.patch
          37 kB
          Alice Sherepa

        Issue Links

          Activity

            What was actually implemented evolved quite a bit from the original task, it doesn't clearly show aliases and does not remove the verbosity, so we shouldn't close this MDEV when https://github.com/MariaDB/server/pull/2376 gets pushed.

            Still, the PR it adds useful functionality, that is: Deprecation message is printed not only for SET but also for command line options, and the --help text includes a deprecation warning for deprecated command line options

            serg Sergei Golubchik added a comment - What was actually implemented evolved quite a bit from the original task, it doesn't clearly show aliases and does not remove the verbosity, so we shouldn't close this MDEV when https://github.com/MariaDB/server/pull/2376 gets pushed. Still, the PR it adds useful functionality, that is: Deprecation message is printed not only for SET but also for command line options, and the --help text includes a deprecation warning for deprecated command line options
            serg Sergei Golubchik added a comment - https://github.com/MariaDB/server/tree/bb-11.5-MDEV-28671-deprecated-in-cmdline
            alice Alice Sherepa added a comment - - edited

            Please rephrase it here:

            "--innodb-prefix-index-cluster-optimization 
                                  Deprecated parameter with no effect. Deprecated, will be
                                  removed in a future release.
                                  (Defaults to on; use --skip-innodb-prefix-index-cluster-optimization to disable.)
            --innodb-purge-rseg-truncate-frequency[=#] 
                                  Deprecated parameter with no effect. Deprecated, will be
                                  removed in a future release."
            

            Please add "will be removed in a future release" here:

            "  --temp-pool         Using this option will cause most temporary files created
                                  to use a small set of names, rather than a unique name
                                  for each new file. Deprecated"
            

            + temp-pool does not give a warning about deprecation after startup

            Could you please also check the status of :

              --metadata-locks-cache-size=# 
                                  Unused
              --metadata-locks-hash-instances=# 
                                  Unused
            

            while KB says nothing about the 'unused':

            metadata_locks_cache_size
            Description: Size of the metadata locks cache, used for reducing the need to create and destroy synchronization objects. It is particularly helpful on systems where this process is inefficient, such as Windows XP.
            Commandline: --metadata-locks-cache-size=#
            Scope: Global
            Dynamic: No
            Data Type: numeric
            Default Value: 1024
            Range: 1 to 1048576
             
            metadata_locks_hash_instances
            Description: Number of hashes used by the set of metadata locks. The metadata locks are partitioned into separate hashes in order to reduce contention.
            Commandline: --metadata-locks-hash-instances=#
            Scope: Global
            Dynamic: No
            Data Type: numeric
            Default Value: 8
            Range: 1 to 1024
            

            alice Alice Sherepa added a comment - - edited Please rephrase it here: "--innodb-prefix-index-cluster-optimization Deprecated parameter with no effect. Deprecated, will be removed in a future release. (Defaults to on; use --skip-innodb-prefix-index-cluster-optimization to disable.) --innodb-purge-rseg-truncate-frequency[=#] Deprecated parameter with no effect. Deprecated, will be removed in a future release." Please add "will be removed in a future release" here: " --temp-pool Using this option will cause most temporary files created to use a small set of names, rather than a unique name for each new file. Deprecated" + temp-pool does not give a warning about deprecation after startup Could you please also check the status of : --metadata-locks-cache-size=# Unused --metadata-locks-hash-instances=# Unused while KB says nothing about the 'unused': metadata_locks_cache_size Description: Size of the metadata locks cache, used for reducing the need to create and destroy synchronization objects. It is particularly helpful on systems where this process is inefficient, such as Windows XP. Commandline: --metadata-locks-cache-size=# Scope: Global Dynamic: No Data Type: numeric Default Value: 1024 Range: 1 to 1048576   metadata_locks_hash_instances Description: Number of hashes used by the set of metadata locks. The metadata locks are partitioned into separate hashes in order to reduce contention. Commandline: --metadata-locks-hash-instances=# Scope: Global Dynamic: No Data Type: numeric Default Value: 8 Range: 1 to 1024
            alice Alice Sherepa added a comment -

            3c4ed5aa3da635d3f46d5612a3523236260fcd18 commit is ok to push

            alice Alice Sherepa added a comment - 3c4ed5aa3da635d3f46d5612a3523236260fcd18 commit is ok to push

            Pushed. but as it doesn't fix the problem of the "presentation of alises in mariadbd --verbose --help being highly redundant", I don't know if this issue should be closed.

            serg Sergei Golubchik added a comment - Pushed. but as it doesn't fix the problem of the "presentation of alises in mariadbd --verbose --help being highly redundant", I don't know if this issue should be closed.

            People

              Unassigned Unassigned
              dlenski Daniel Lenski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              11 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.