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

Allow one to use sql_log_off in config files

    XMLWordPrintable

Details

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

    Description

      The purpose of this task is to enable one to configure a server where general log is off
      by default for all users, but any user could enable general logging for his connected if needed to better understand what is happening.

      For this to work, one would have to add the following two options to their configuration file:

      • general-log=...
      • sql_log_bin=1

      Any user that would like to enable general logging could do this by executing:
      @@sql_log_off=1;

      Implementation:

      To enable this, the following changes would be needed:

      • Removing NO_CMD_LINE from sql_log_off variable in sys_vars.cc
      • Allowing any users to set sql_log_off to 0. This would enable general-logging for the user if general log is enabled for the server.
      • Not requiring SUPER privilege for changing session.sql_log_off to 1 of global.sql_log_off is 1.
      • Updating the variable comment for sql_log_off.
      • Adding a test case

      This would make this feature 100% backward compatible to what we already have.
      (Except in the very unlikely case where someone has explicitly executed @@global.sql_log_off=1 on the server as super user)

      Attachments

        Activity

          People

            Unassigned Unassigned
            monty Michael Widenius
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.