Commit 19107288 authored by iggy@alf.(none)'s avatar iggy@alf.(none)
Browse files

Bug#28774 mysql_upgrade creates tempfiles in root-dir (C:\) and

doesn't clean them up
- Make sure to cleanup temporary files after use.
parent 80a2d47b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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,