summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2010-06-07 13:30:23 +0200
committerBjorn Munch <Bjorn.Munch@sun.com>2010-06-07 13:30:23 +0200
commitbb6e8b6942333e523f50d3e0bdda7b61b9fff1da (patch)
tree30221608e092f238424ac06c75d55037c3a4e440 /client
parentd5f2972628d90595c203bd82ec5def2d3d0a82da (diff)
downloadmariadb-git-bb6e8b6942333e523f50d3e0bdda7b61b9fff1da.tar.gz
Bug #53374 Don't delete temporary perl file if perl fails
Simple condition on the delete stmt But NB: next mtr run will clean up and remove the temp file
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 217428f7db3..a3ae0ebb18c 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -3785,8 +3785,9 @@ void do_perl(struct st_command *command)
}
error= pclose(res_file);
- /* Remove the temporary file */
- my_delete(temp_file_path, MYF(0));
+ /* Remove the temporary file, but keep it if perl failed */
+ if (!error)
+ my_delete(temp_file_path, MYF(0));
handle_command_error(command, WEXITSTATUS(error));
}