Bug #34202 Backup: RESTORE turns off the slow log
Submitted: 31 Jan 2008 18:53 Modified: 18 Aug 2009 19:28
Reporter: Peter Gulutzan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0.5-alpha-debug OS:Linux (SUSE 10 64-bit)
Assigned to: Chuck Bell CPU Architecture:Any

[31 Jan 2008 18:53] Peter Gulutzan
Description:
I'm using 6.0-backup.

I start mysqld with --log-slow-queries --log-slow-admin-statements.
I set @@long_query_time = 0.000001.
I say BACKUP DATABASE. It gets into the slow log.
I say RESTORE.
I say several more "slow" SQL statements.
Nothing gets into the slow log.

How to repeat:
Start mysqld with:
--skip-networking --log-slow-queries --log-slow-admin-statements

SET @@long_query_time = 0.000001;
BACKUP DATABASE test TO '20';
select * from mysql.slow_log;
RESTORE FROM '20';
BACKUP DATABASE test TO '21';
CREATE TABLE test.t (s1 INT);
INSERT INTO test.t VALUES (0);
SELECT * FROM mysql.slow_log;
[1 Feb 2008 12:46] MySQL Verification Team
Thank you for the bug report. Verified as described.
[11 Aug 2009 15:37] Chuck Bell
This is a cannot repeat bug. I have created a test for regression testing. Only need 1 of the reviewers to check the patch as it is testing only.
[11 Aug 2009 15:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/80596

2858 Chuck Bell	2009-08-11
      BUG#34202 : SELECT * from mysql.slow_log;
      
      The problem of backup and restore turning off the slow query log
      cannot be repeated. This patch contains a regression test to detect
      the problem should it reappear.
     @ mysql-test/suite/backup/r/backup_slow_query_log.result
        New result file.
     @ mysql-test/suite/backup/t/backup_slow_query_log.opt
        Option file to turn on log slow queries.
     @ mysql-test/suite/backup/t/backup_slow_query_log.test
        New test file with test for slow query log writing of commands.
[12 Aug 2009 6:55] Rafal Somla
Good to push.
[13 Aug 2009 13:45] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/80759
[13 Aug 2009 13:48] Chuck Bell
Patch pushed to team tree.
[18 Aug 2009 13:23] Jørgen Løland
Reopening since test fails in PB.
[18 Aug 2009 19:28] Chuck Bell
Test fixed. Still cannot repeat.
[18 Aug 2009 19:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/81010

2860 Chuck Bell	2009-08-18
      BUG#34202 : Backup: RESTORE turns off the slow log
      
      Fix problem in test for inconsistent rows in slow query log.
      Removed SELECT.
     @ mysql-test/suite/backup/r/backup_slow_query_log.result
        Corrected result file.
     @ mysql-test/suite/backup/t/backup_slow_query_log.test
        Removed SELECT.
[18 Aug 2009 19:32] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/81011

2861 Chuck Bell	2009-08-18 [merge]
      Local merge before push of BUG#34202 regression test correction.
[28 Aug 2009 10:01] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090828100112-r73xkx8dhekz5bbb) (version source revid:jorgen.loland@sun.com-20090819062832-mzgo92b5zw4lfqkc) (merge vers: 5.4.4-alpha) (pib:11)