summaryrefslogtreecommitdiff
path: root/tests/mysql_client_fw.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-02-11 09:26:53 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-02-11 09:26:53 +0200
commitb19ec8848c9463b86d62601dffb67c75e3dfbd70 (patch)
tree203f6bf23338813575214c23a8fee5a99f7ca2fb /tests/mysql_client_fw.c
parentbfb4761ca04704d68dba51f76d7c9967f880a6ee (diff)
parentc7edbe5bb1222634adb0c45ca86c62fb544ce246 (diff)
downloadmariadb-git-b19ec8848c9463b86d62601dffb67c75e3dfbd70.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'tests/mysql_client_fw.c')
-rw-r--r--tests/mysql_client_fw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c
index bcf62eb0e18..d66ab814f4d 100644
--- a/tests/mysql_client_fw.c
+++ b/tests/mysql_client_fw.c
@@ -1272,7 +1272,7 @@ static struct my_tests_st *get_my_tests(); /* To be defined in main .c file */
static struct my_tests_st *my_testlist= 0;
static my_bool
-get_one_option(const struct my_option *opt, char *argument,
+get_one_option(const struct my_option *opt, const char *argument,
const char *filename __attribute__((unused)))
{
switch (opt->id) {
@@ -1285,10 +1285,15 @@ get_one_option(const struct my_option *opt, char *argument,
case 'p':
if (argument)
{
- char *start=argument;
+ /*
+ One should not really change the argument, but we make an
+ exception for passwords
+ */
+ char *start= (char*) argument;
my_free(opt_password);
opt_password= my_strdup(PSI_NOT_INSTRUMENTED, argument, MYF(MY_FAE));
- while (*argument) *argument++= 'x'; /* Destroy argument */
+ while (*argument)
+ *(char*) argument++= 'x'; /* Destroy argument */
if (*start)
start[1]=0;
}