From: Date: November 20 2008 2:53pm Subject: bzr commit into mysql-6.0-backup branch (jorgen.loland:2740) Bug#34579 List-Archive: http://lists.mysql.com/commits/59379 X-Bug: 34579 Message-Id: <20081120135351.8D1143B802A@atum06.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///localhome/jl208045/mysql/mysql-6.0-backup-empty/ 2740 Jorgen Loland 2008-11-20 Bug#34579 - Backup: Restore overwrites the new / modified data without warning Follow-up patch: Fix compile warning and cleanup iterator object in case of DBUG_RETURN modified: sql/backup/kernel.cc per-file messages: sql/backup/kernel.cc Fix compile warning and cleanup iterator object in case of DBUG_RETURN === modified file 'sql/backup/kernel.cc' --- a/sql/backup/kernel.cc 2008-11-17 09:57:51 +0000 +++ b/sql/backup/kernel.cc 2008-11-20 13:53:41 +0000 @@ -1236,8 +1236,9 @@ int Backup_restore_ctx::do_restore(bool } Image_info::Db *mydb; - while (mydb= static_cast((*dbit)++)) { + while ((mydb= static_cast((*dbit)++))) { if (!obs::check_db_existence(&mydb->name())) { + delete dbit; DBUG_RETURN(fatal_error(ER_RESTORE_DB_EXISTS, mydb->name().ptr())); } }