From: Date: April 19 2007 7:41pm Subject: bk commit into 5.0 tree (dkatz:1.2462) BUG#25761 List-Archive: http://lists.mysql.com/commits/24916 X-Bug: 25761 Message-Id: <20070419174117.C40772C86C9@damien-katzs-computer.local> Below is the list of changes that have just been committed into a local 5.0 repository of dkatz. When dkatz does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-04-19 13:41:12-04:00, dkatz@stripped +1 -0 Bug #25761 Table is partially created when disk is full, causing database corruption mysys/my_copy.c@stripped, 2007-04-19 13:41:08-04:00, dkatz@stripped +6 -1 my_copy now deletes any partially copied file if the copy fails to complete. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: dkatz # Host: damien-katzs-computer.local # Root: /Users/dkatz/50c --- 1.15/mysys/my_copy.c 2006-12-23 14:04:07 -05:00 +++ 1.16/mysys/my_copy.c 2007-04-19 13:41:08 -04:00 @@ -111,6 +111,11 @@ int my_copy(const char *from, const char err: if (from_file >= 0) VOID(my_close(from_file,MyFlags)); - if (to_file >= 0) VOID(my_close(to_file,MyFlags)); + if (to_file >= 0) + { + VOID(my_close(to_file, MyFlags)); + /* attempt to delete the to-file we've partially written */ + VOID(my_delete(to, MyFlags)); + } DBUG_RETURN(-1); } /* my_copy */