List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:December 17 2008 5:52pm
Subject:Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2741)
Bug#40305
View as plain text  
STATUS
------
Patch approved pending completion of requests.

REQUESTS
--------
1. The backup_errors test fails on Windows.
2. The patch fails to apply to latest tree. Please resolve as the 
kernel.cc code has changed a bit.

Hunk #13 succeeded at 1303 (offset 3 lines).
Hunk #14 FAILED at 2027.
3 out of 14 hunks FAILED -- saving rejects to file sql/backup/kernel.cc.rej
patching file sql/backup/logger.h
patching file sql/share/errmsg.txt
Hunk #1 FAILED at 6442.
1 out of 1 hunk FAILED -- saving rejects to file sql/share/errmsg.txt.rej

COMMENTARY
----------
None

DETAILS
-------
>       Bug #40305 - Backup: Bad feedback when BACKUP/RESTORE operation aborted.
>       
>       This patch refactors the code reporting termination of BACKUP/RESTORE
> statement. 
>       After the changes "Backup/Restore completed" is shown only if operation has
> been 
>       completed. In case of abnormal termination (error, interruption) a warning 
>       "Operation aborted" or "Operation aborted - data might be corrupted" is logged.
> 
>       The latter is in the case of RESTORE operation which has modified some data in
> 
>       the server.
>       
>       The main changes are:
>       - Function backup::Logger::report_stop() is replaced by 2 new functions: 
>         report_completed() and report_aborted() to differentiate the feedback given
> in 
>         the two situations.
>       - Make sure that a call to report_completed() or report_aborted() always
> matches 
>         a previous call to report_start(). This is done in
> Backup_restore_ctx::close() 
>         which is called from the destructor.
>       - Change the logic for removing backup file (in case BACKUP operation is not 
>         completed). Before this was guarded by explicit m_remove_loc flag. Now we can
> 
>         directly check if BACKUP operation has been completed successfully (i.e. 
>         report_completed() was called) or not.

...

> === modified file 'mysql-test/suite/backup/r/backup_errors.result'
> --- a/mysql-test/suite/backup/r/backup_errors.result	2008-12-15 12:18:24 +0000
> +++ b/mysql-test/suite/backup/r/backup_errors.result	2008-12-17 09:53:30 +0000

...

> @@ -32,11 +35,13 @@ ERROR 42000: Unknown database 'foo'
>  SHOW WARNINGS;
>  Level	Code	Message
>  Error	1049	Unknown database 'foo'
> +Warning	1759	Operation aborted

[1] You missed this one. The error code should have been masked out. The 
test fails with:

backup.backup_errors           [ fail ]

--- 
d:/source/bzr/mysql-6.0-review/mysql-test/suite/backup/r/backup_errors.result 
       2008-12-17 19:01:49.681999100 +0300
+++ 
d:\source\bzr\mysql-6.0-review\mysql-test\suite\backup\r\backup_errors.reject 
       2008-12-17 19:11:20.360599100 +0300
@@ -35,7 +35,7 @@
  SHOW WARNINGS;
  Level  Code    Message
  Error  1049    Unknown database 'foo'
-Warning        1757    Operation aborted
+Warning        1759    Operation aborted
  BACKUP DATABASE test,foo,bdb,bar TO 'test.bak';
  ERROR 42000: Unknown database 'foo,bar'
  SHOW WARNINGS;

mysqltest: Result content mismatch

...

Chuck

Thread
bzr commit into mysql-6.0-backup branch (Rafal.Somla:2741) Bug#40305Rafal Somla17 Dec
  • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2741)Bug#40305Chuck Bell17 Dec
    • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2741)Bug#40305Rafal Somla18 Dec
  • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2741)Bug#40305Øystein Grøvlen23 Dec
    • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2741)Bug#40305Rafal Somla6 Jan
      • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2741)Bug#40305Øystein Grøvlen7 Jan
        • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2741)Bug#40305Rafal Somla8 Jan