diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 5 |
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)); } |