diff options
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r-- | client/mysqltest.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 417d3615995..13282153cfb 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -97,7 +97,8 @@ static int setenv(const char *name, const char *value, int overwrite); C_MODE_START static sig_handler signal_handler(int sig); -static my_bool get_one_option(const struct my_option *, char *, const char *); +static my_bool get_one_option(const struct my_option *, const char *, + const char *); C_MODE_END enum { @@ -7141,7 +7142,7 @@ void read_embedded_server_arguments(const char *name) static my_bool -get_one_option(const struct my_option *opt, char *argument, const char *) +get_one_option(const struct my_option *opt, const char *argument, const char *) { switch(opt->id) { case '#': @@ -7189,9 +7190,14 @@ get_one_option(const struct my_option *opt, char *argument, const char *) argument= const_cast<char*>(""); // Don't require password if (argument) { + /* + One should not really change the argument, but we make an + exception for passwords + */ my_free(opt_pass); opt_pass= my_strdup(PSI_NOT_INSTRUMENTED, argument, MYF(MY_FAE)); - while (*argument) *argument++= 'x'; /* Destroy argument */ + while (*argument) + *(char*)argument++= 'x'; /* Destroy argument */ tty_password= 0; } else |