diff options
Diffstat (limited to 'tests/mysql_client_fw.c')
-rw-r--r-- | tests/mysql_client_fw.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c index e8d628e7b52..9e9788258a7 100644 --- a/tests/mysql_client_fw.c +++ b/tests/mysql_client_fw.c @@ -1275,10 +1275,10 @@ 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(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 '#': DBUG_PUSH(argument ? argument : default_dbug_option); break; @@ -1288,10 +1288,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), 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(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; } @@ -1321,7 +1326,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), } if (embedded_server_arg_count == MAX_SERVER_ARGS-1 || !(embedded_server_args[embedded_server_arg_count++]= - my_strdup(argument, MYF(MY_FAE)))) + my_strdup(PSI_NOT_INSTRUMENTED, argument, MYF(MY_FAE)))) { DIE("Can't use server argument"); } |