MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Ignacio Galarza Date:October 9 2007 2:30am
Subject:bk commit into 5.0 tree (iggy:1.2527) BUG#28774
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of iggy. When iggy 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-10-08 22:30:41-04:00, iggy@alf.(none) +1 -0
  Bug#28774 mysql_upgrade creates tempfiles in root-dir (C:\) and 
  doesn't clean them up
  - Make sure to cleanup temporary files after use.

  client/mysql_upgrade.c@stripped, 2007-10-08 22:30:39-04:00, iggy@alf.(none) +4 -0
    Bug#28774 mysql_upgrade creates tempfiles in root-dir (C:\) and 
    doesn't clean them up
    - Close file handle and delete temporary file when write fails.

diff -Nrup a/client/mysql_upgrade.c b/client/mysql_upgrade.c
--- a/client/mysql_upgrade.c	2007-09-14 22:45:10 -04:00
+++ b/client/mysql_upgrade.c	2007-10-08 22:30:39 -04:00
@@ -456,7 +456,11 @@ static int run_query(const char *query, 
 
   if (my_write(fd, query, strlen(query),
                MYF(MY_FNABP | MY_WME)))
+  {
+    my_close(fd, MYF(0));
+    my_delete(query_file_path, MYF(0));
     die("Failed to write to '%s'", query_file_path);
+  }
 
   ret= run_tool(mysql_path,
                 ds_res,
Thread
bk commit into 5.0 tree (iggy:1.2527) BUG#28774Ignacio Galarza9 Oct