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

can't drop mysql.slow_log if slow_log=on even with log_output=FILE

    XMLWordPrintable

    Details

      Description

      See also http://bugs.mysql.com/bug.php?id=69953

      Can't drop mysql.slow_log if slow_log=on even with log_output=FILE or NONE

      I can understand preventing dropping of a log table that is in active use,
      but with log_output!=TABLE it should be dropable the same way as it is when logging is not active at all

      How to repeat:

      SET GLOBAL log_output='FILE';
      SET GLOBAL slow_query_log=1;
      SET GLOBAL slow_query_log_file='/tmp/slow.log';
       
      DROP TABLE mysql.slow_log;
      # => ERROR 1580 (HY000): You cannot 'DROP' a log table if logging is enabled
       
      SET GLOBAL log_output='NONE';
       
      DROP TABLE mysql.slow_log;
      # => ERROR 1580 (HY000): You cannot 'DROP' a log table if logging is enabled
       
      SET GLOBAL slow_query_log=0;
       
      DROP TABLE mysql.slow_log;
      # => success

      Suggested fix:
      only prevent drop of "magic" log tables if logging is enabled and configured to log to the table

        Attachments

          Activity

            People

            Assignee:
            danblack Daniel Black
            Reporter:
            hholzgra Hartmut Holzgraefe
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration