mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
This commit is contained in:
@@ -456,7 +456,11 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
|
|||||||
|
|
||||||
if (my_write(fd, query, strlen(query),
|
if (my_write(fd, query, strlen(query),
|
||||||
MYF(MY_FNABP | MY_WME)))
|
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);
|
die("Failed to write to '%s'", query_file_path);
|
||||||
|
}
|
||||||
|
|
||||||
ret= run_tool(mysql_path,
|
ret= run_tool(mysql_path,
|
||||||
ds_res,
|
ds_res,
|
||||||
|
Reference in New Issue
Block a user