summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-12-07 20:05:45 +0100
committerGitHub <noreply@github.com>2021-12-07 20:05:45 +0100
commitc6422cbe135862132b85d6dbf670371939cc493a (patch)
tree10e627c4935f036ac1da9572b00b27412e6e9563
parentda68479c46b050788c0c0da93b2ff9dad143960d (diff)
parentf13c2107b39a6dd1e52bb582545631a4d93f2681 (diff)
downloadmariadb-git-bb-10.2-MDEV-19129.tar.gz
Merge branch '10.2' into bb-10.2-MDEV-19129bb-10.2-MDEV-19129
-rw-r--r--appveyor.yml4
-rw-r--r--client/mysql.cc11
-rw-r--r--sql/mysql_upgrade_service.cc4
3 files changed, 9 insertions, 10 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 9797aec6b44..e8902eec589 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -6,6 +6,10 @@ init:
version: build-{build}~branch-{branch}
+cache:
+ - C:\ProgramData\chocolatey\bin -> appveyor.yml
+ - C:\ProgramData\chocolatey\lib -> appveyor.yml
+
clone_depth: 1
build_script:
diff --git a/client/mysql.cc b/client/mysql.cc
index 177d0f60757..382c216f772 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -96,8 +96,8 @@ extern "C" {
# include <readline.h>
# endif
#define HAVE_READLINE
-#define USE_POPEN
#endif
+#define USE_POPEN
}
#ifdef HAVE_VIDATTR
@@ -4210,11 +4210,6 @@ com_nopager(String *buffer __attribute__((unused)),
}
#endif
-
-/*
- Sorry, you can't send the result to an editor in Win32
-*/
-
#ifdef USE_POPEN
static int
com_edit(String *buffer,char *line __attribute__((unused)))
@@ -4236,7 +4231,7 @@ com_edit(String *buffer,char *line __attribute__((unused)))
if (!(editor = (char *)getenv("EDITOR")) &&
!(editor = (char *)getenv("VISUAL")))
- editor = "vi";
+ editor = IF_WIN("notepad","vi");
strxmov(buff,editor," ",filename,NullS);
if ((error= system(buff)))
{
@@ -4251,7 +4246,7 @@ com_edit(String *buffer,char *line __attribute__((unused)))
if ((fd = my_open(filename,O_RDONLY, MYF(MY_WME))) < 0)
goto err;
(void) buffer->alloc((uint) stat_arg.st_size);
- if ((tmp=read(fd,(char*) buffer->ptr(),buffer->alloced_length())) >= 0L)
+ if ((tmp=(int)my_read(fd,(uchar*) buffer->ptr(),buffer->alloced_length(),MYF(0))) >= 0)
buffer->length((uint) tmp);
else
buffer->length(0);
diff --git a/sql/mysql_upgrade_service.cc b/sql/mysql_upgrade_service.cc
index 5afe4ccbc52..78302520f82 100644
--- a/sql/mysql_upgrade_service.cc
+++ b/sql/mysql_upgrade_service.cc
@@ -464,8 +464,8 @@ int main(int argc, char **argv)
if (WaitForSingleObject(mysqld_process, 0) != WAIT_TIMEOUT)
die("mysqld.exe did not start");
- if (run_tool(P_WAIT, mysqladmin_path, "--protocol=pipe",
- socket_param, "ping", NULL) == 0)
+ if (run_tool(P_WAIT, mysqladmin_path, "--protocol=pipe", socket_param,
+ "ping", "--no-beep", NULL) == 0)
{
break;
}