diff options
Diffstat (limited to 'client/mysql_upgrade.c')
-rw-r--r-- | client/mysql_upgrade.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 6cb3af43282..c8e21443b34 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -1088,6 +1088,8 @@ int main(int argc, char **argv) { int fd= create_temp_file(cnf_file_path, opt_tmpdir[0] ? opt_tmpdir : NULL, "mysql_upgrade-", O_CREAT | O_WRONLY, MYF(MY_FAE)); + if (fd < 0) + die(NULL); my_write(fd, USTRING_WITH_LEN( "[client]\n"), MYF(MY_FAE)); my_write(fd, (uchar*)ds_args.str, ds_args.length, MYF(MY_FAE)); my_close(fd, MYF(0)); |