diff options
Diffstat (limited to 'client/mysqlshow.c')
-rw-r--r-- | client/mysqlshow.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 0a59f6ac54f..3e8f399d610 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -289,10 +289,10 @@ are shown."); static my_bool -get_one_option(int optid, const struct my_option *opt __attribute__((unused)), - char *argument) +get_one_option(const struct my_option *opt, const char *argument, + const char *filename __attribute__((unused))) { - switch(optid) { + switch(opt->id) { case 'v': opt_verbose++; break; @@ -301,10 +301,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), argument= (char*) ""; /* Don't require password */ 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(argument,MYF(MY_FAE)); - while (*argument) *argument++= 'x'; /* Destroy argument */ + opt_password=my_strdup(PSI_NOT_INSTRUMENTED, argument, MYF(MY_FAE)); + while (*argument) + *(char*) argument++= 'x'; /* Destroy argument */ if (*start) start[1]=0; /* Cut length of argument */ tty_password= 0; |