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

mysqld --version prints unrelated messages

Details

    Description

      These are way too verbose.

      $ 10.2.5/bin/mysqld --version
      2017-04-27  7:52:03 140501412242944 [Warning] option 'server_id': unsigned value 0 adjusted to 1
      10.2.5/bin/mysqld  Ver 10.2.5-MariaDB-log for Linux on x86_64 (MariaDB Server)
      2017-04-27  7:52:03 140501412242944 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set
      

      This is rather cosmetic issue but may also lead to problems in setups which rely on parsing of --version output
      10.1 and 5.7.18 doesn't show this problem in identical configuration

      $ 10.1.22/bin/mysqld --version
      10.1.22/bin/mysqld  Ver 10.1.22-MariaDB for Linux on x86_64 (MariaDB Server)
      $ 5.7.18/bin/mysqld --version
      5.7.18/bin/mysqld  Ver 5.7.18 for linux-glibc2.5 on x86_64 (MySQL Community Server (GPL))
      

      Attachments

        Issue Links

          Activity

            It looks the problem present in 10.1 as well, just it doesn't trigger in default configuration:

            $ 10.1.22/bin/mysqld --version --log-queries-not-using-indexes=1
            10.1.22/bin/mysqld  Ver 10.1.22-MariaDB for Linux on x86_64 (MariaDB Server)
            2017-04-27  8:04:11 139934258677312 [Warning] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set
            

            anikitin Andrii Nikitin (Inactive) added a comment - It looks the problem present in 10.1 as well, just it doesn't trigger in default configuration: $ 10.1.22/bin/mysqld --version --log-queries-not-using-indexes=1 10.1.22/bin/mysqld Ver 10.1.22-MariaDB for Linux on x86_64 (MariaDB Server) 2017-04-27 8:04:11 139934258677312 [Warning] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set

            I see three problems:
            1. --version shouldn't check correctness of configuration (let it be checked with --help for example). This is change in behavior, but rather 'corrected behavior, as the only purpose of --version is to report version.

            2. --no-defaults --help shouldn't give any warnings (i.e. default configuration shouldn't have conflicts)

            10.2.5/bin/mysqld --no-defaults --help > 1
            2017-04-27  9:08:04 140696737932800 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set
            

            3. The warning above is meaningless if default values for these variables is ON . Thus I propose just remove that check from code.

            anikitin Andrii Nikitin (Inactive) added a comment - I see three problems: 1. --version shouldn't check correctness of configuration (let it be checked with --help for example). This is change in behavior, but rather 'corrected behavior, as the only purpose of --version is to report version. 2. --no-defaults --help shouldn't give any warnings (i.e. default configuration shouldn't have conflicts) 10.2.5/bin/mysqld --no-defaults --help > 1 2017-04-27 9:08:04 140696737932800 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set 3. The warning above is meaningless if default values for these variables is ON . Thus I propose just remove that check from code.
            elenst Elena Stepanova added a comment - - edited

            For points 2-3 (they are basically the same, 2 is the general rule and 3 is its violation) we had MDEV-11908, which is closed now, but apparently the "fix" was just converting a warning into a note. I don't think it's critically important whether a note appears in the error log (although it's still strange), but it most certainly shouldn't pop up upon help or version. I agree it's 10.2-ga.

            Point 1 is more general, it might be better to postpone it till after GA or till the next major release.

            Another somewhat related (and still open) issue is MDEV-10648.

            elenst Elena Stepanova added a comment - - edited For points 2-3 (they are basically the same, 2 is the general rule and 3 is its violation) we had MDEV-11908 , which is closed now, but apparently the "fix" was just converting a warning into a note. I don't think it's critically important whether a note appears in the error log (although it's still strange), but it most certainly shouldn't pop up upon help or version. I agree it's 10.2-ga. Point 1 is more general, it might be better to postpone it till after GA or till the next major release. Another somewhat related (and still open) issue is MDEV-10648 .

            I've created new bug MDEV-12650 related to server_id , as the problem appears to be even bigger issue

            After all general Point 1 is current behavior as mysqld doesn't really verify parameters with --version (which I consider good behavior):

            10.2.5/bin/mysqld --version --key-buffer-size=12800000000G --innodb-buffer-size=128000G --dsfsadf --plugin-load=xyz
            2017-05-01  8:26:22 140643309708800 [Warning] option 'server_id': unsigned value 0 adjusted to 1
            10.2.5/bin/mysqld  Ver 10.2.5-MariaDB-log for Linux on x86_64 (MariaDB Server)
            2017-05-01  8:26:22 140643309708800 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set
            

            This brings even stronger reasoning to why # 3. and MDEV-12650 must be fixed.

            Indeed #3 is violation of #2, but it must be fixed (with new defaults) even if it wasn't (or if #2 wouldn't be accepted as common rule).

            anikitin Andrii Nikitin (Inactive) added a comment - I've created new bug MDEV-12650 related to server_id , as the problem appears to be even bigger issue After all general Point 1 is current behavior as mysqld doesn't really verify parameters with --version (which I consider good behavior): 10.2.5 /bin/mysqld --version --key-buffer-size=12800000000G --innodb-buffer-size=128000G --dsfsadf --plugin-load=xyz 2017-05-01 8:26:22 140643309708800 [Warning] option 'server_id' : unsigned value 0 adjusted to 1 10.2.5 /bin/mysqld Ver 10.2.5-MariaDB-log for Linux on x86_64 (MariaDB Server) 2017-05-01 8:26:22 140643309708800 [Note] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log-slow-queries is not set This brings even stronger reasoning to why # 3. and MDEV-12650 must be fixed. Indeed #3 is violation of #2, but it must be fixed (with new defaults) even if it wasn't (or if #2 wouldn't be accepted as common rule).

            Removed warning about log_slow_statements, as it is not valid anymore for 10.2 (defaults are set such that it would always be generated).
            The server_id is something else, it does not happen with default settings.

            wlad Vladislav Vaintroub added a comment - Removed warning about log_slow_statements, as it is not valid anymore for 10.2 (defaults are set such that it would always be generated). The server_id is something else, it does not happen with default settings.

            People

              wlad Vladislav Vaintroub
              anikitin Andrii Nikitin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.