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

Write warning in error log if option is set in configuration files multiple times

Details

    Description

      When a user's configuration file has an !includedir directive and the user has accidentally set an option multiple times in multiple files, a lot of the time the user doesn't even notice until things aren't working as they expect them to. This is more often true for users who use our enterprise packages, since mariadb-enterprise.cnf sets a bunch of common options.

      If an option is set multiple times in configuration files, it would be great if some kind of warning similar to the following could be printed to the error log:

      [Warning] Option 'binlog_format' set multiple times in configuration files. Using the last value read from file 'z.cnf'. Using value 'MIXED'.
      

      Attachments

        Activity

          serg Sergei Golubchik added a comment - - edited

          Having one option in many files is quite normal and common. I'm not great fan of issuing warnings for a valid and documented use of a feature just because someone somewhere might use it by mistake and get unexpected resulst (hi, gcc!).

          May be only as a note or only for high values of @@log_warnings... But then it won't serve its purpose — it won't help unexperienced users. Those who know how to increase the log verbosity, they also know that an option may be present in many files and they know how to use mysqld --help --verbose and my_print_defaults --mysqld.

          serg Sergei Golubchik added a comment - - edited Having one option in many files is quite normal and common. I'm not great fan of issuing warnings for a valid and documented use of a feature just because someone somewhere might use it by mistake and get unexpected resulst (hi, gcc!). May be only as a note or only for high values of @@log_warnings ... But then it won't serve its purpose — it won't help unexperienced users. Those who know how to increase the log verbosity, they also know that an option may be present in many files and they know how to use mysqld --help --verbose and my_print_defaults --mysqld .

          The purpose is not just for "unexperienced users". What about experienced users trying to quickly solve problems for customers, for instance? With more and more config files (mariadb-enterprise.cnf, tokudb.cnf, galera.cnf,...) and locations (...), I personally think this is an excellent request.

          I'm fine with it being logged for log_warnings=2+, fwiw. I really like that approach.

          Thank you for your consideration.

          ccalender Chris Calender (Inactive) added a comment - The purpose is not just for "unexperienced users". What about experienced users trying to quickly solve problems for customers, for instance? With more and more config files (mariadb-enterprise.cnf, tokudb.cnf, galera.cnf,...) and locations (...), I personally think this is an excellent request. I'm fine with it being logged for log_warnings=2+, fwiw. I really like that approach. Thank you for your consideration.

          Experienced users can run my_print_defaults --mysqld.
          But ok, it's a valid feature request.

          serg Sergei Golubchik added a comment - Experienced users can run my_print_defaults --mysqld . But ok, it's a valid feature request.
          ralf.gebhardt Ralf Gebhardt added a comment -

          I have removed the fixVersion for this task as it is one of 5.5, 10.1, 10.2, 10.3, which are EOLed.

          Please add a new fixVersion if you plan to work on this task for a not EOLed versions.

          ralf.gebhardt Ralf Gebhardt added a comment - I have removed the fixVersion for this task as it is one of 5.5, 10.1, 10.2, 10.3, which are EOLed. Please add a new fixVersion if you plan to work on this task for a not EOLed versions.

          People

            Unassigned Unassigned
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 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.