Commit d0204889 authored by unknown's avatar unknown

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:
  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.
parent bc8d42f9
......@@ -456,7 +456,11 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment