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

LP:695918 - Wrong recommendation for parameter slow_query_log in warning during startup

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      When I start the database with

      slow_query_log = 0

      I get the following warning:

      101231  8:15:06 [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

      This is a wrong recommendation. log_slow_queries is deprecated slow_query_log should be used instead in the error message.

      sql/mysqld.cc
         9244   if ((opt_log_slow_admin_statements || opt_log_queries_not_using_indexes ||
         9245        opt_log_slow_slave_statements) &&
         9246       !opt_slow_log)
         9247     sql_print_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");

      What further comes into my mind in this relation is if it makes sense at all to print this warning if I have explicitly mentioned slow_query_log = 0. Because then I have expressed my wish to disable the slow query log and should not be warned about.
      Can we distinguish between "set to zero" and "not set at all" in the opt_slow_log variable? Then we could make the if in line 9244 a bit more sophisticated.
      For example: ... && (opt_slow_log == NULL)

      Attachments

        Activity

          People

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