summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-11-19 10:45:28 +0800
committerMarko Mäkelä <marko.makela@mariadb.com>2019-11-19 10:45:28 +0800
commita9846f329935faba560387bab8fd897102e17385 (patch)
tree2734986279de4dbea54be2dda25c994fd99498a8 /client
parent6d373e8b817861d3fd3cb181c02d45d2874d5a27 (diff)
parent589a1235b64866c7bbe85da2a6f6bf19ee8282fe (diff)
downloadmariadb-git-a9846f329935faba560387bab8fd897102e17385.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'client')
-rw-r--r--client/mysql_upgrade.c4
-rw-r--r--client/mysqltest.cc14
2 files changed, 5 insertions, 13 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 8fb5ae4a577..73a9791d593 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -383,7 +383,7 @@ static int run_command(char* cmd,
if (opt_verbose >= 4)
puts(cmd);
- if (!(res_file= popen(cmd, "r")))
+ if (!(res_file= my_popen(cmd, IF_WIN("rt","r"))))
die("popen(\"%s\", \"r\") failed", cmd);
while (fgets(buf, sizeof(buf), res_file))
@@ -401,7 +401,7 @@ static int run_command(char* cmd,
}
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
return WEXITSTATUS(error);
}
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 59cf7065a69..2e3f0aa79fa 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -871,14 +871,6 @@ static char *my_fgets(char * s, int n, FILE * stream, int *len)
return buf;
}
-/*
- Wrapper for popen().
-*/
-static FILE* my_popen(const char *cmd, const char *mode)
-{
- return popen(cmd, mode);
-}
-
#ifdef EMBEDDED_LIBRARY
#define EMB_SEND_QUERY 1
@@ -1853,7 +1845,7 @@ static int run_command(char* cmd,
}
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
DBUG_RETURN(WEXITSTATUS(error));
}
@@ -3439,7 +3431,7 @@ void do_exec(struct st_command *command)
{
replace_dynstr_append_mem(ds_result, buf, len);
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
if (display_result_sorted)
{
@@ -4669,7 +4661,7 @@ void do_perl(struct st_command *command)
replace_dynstr_append_mem(&ds_res, buf, len);
}
}
- error= pclose(res_file);
+ error= my_pclose(res_file);
/* Remove the temporary file, but keep it if perl failed */
if (!error)