Bug #71185 mysqladmin cannot shudown if i set prompt option in my.cnf file.
Submitted: 19 Dec 2013 21:55 Modified: 20 Jan 2014 6:20
Reporter: 徹 赤松 Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:ADMIN_VERSION "8.42" OS:Linux
Assigned to: CPU Architecture:Any
Tags: mysqladmin, prompt

[19 Dec 2013 21:55] 徹 赤松
Description:
After I set a prompt in my.cnf file.
I cannot shudown mysqld by use mysqladmin shutdown command.
There art no prompt option in my_long_options[].
 
   124  static struct my_option my_long_options[] =

So i add prompt option in my_long_options[] and complie,
and i mysqladmin shutdown success.

 

How to repeat:
# mysqladmin shutdown
mysqladmin: unknown variable 'prompt=kvmtest2 >'

Suggested fix:
version mysql-5.6.14, in client/mysqladmin.cc file.

124  static struct my_option my_long_options[] =
125  {

*** add start ***
229  {"prompt", OPT_PROMPT, "Set prompt on client display.", 0, 0, 0, GET_STR,
230    REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
*** add end   ***

231  { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
232  };

at end of my_long_options[], i add line number 229,239 "prompt".
After compile, i can mysqladmin shutdown success.

It is kind if you can reply.
[20 Dec 2013 6:20] Shane Bester
hi, it might not be any bug.  please put the prompt setting into [mysql] instead of [client] section and see if it works.
[21 Jan 2014 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".