Bug #104196 Please document the lifecycle of the SQL SHUTDOWN Command
Submitted: 2 Jul 2021 21:57 Modified: 15 Jul 2021 15:58
Reporter: Mark Matthews Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7, 8.0 OS:Any
Assigned to: CPU Architecture:Any

[2 Jul 2021 21:57] Mark Matthews
Description:
The documentation for the SHUTDOWN command that can be issued at SQL does not tell the user when the call returns, which leaves some ambiguity. In the current source code, privileges are checked, arguments are validated, the OK packet is sent to the client, and then the server is shutdown. 

It's probably worthwhile to explain this order of events so that callers know what it actually means when the statement returns.

How to repeat:
Read the docs, compare with the implementation of

bool shutdown(THD *thd, enum mysql_enum_shutdown_level level);
[3 Jul 2021 7:03] MySQL Verification Team
Hello Mark,

Thank you for the report and feedback.

regards,
Umesh
[15 Jul 2021 15:58] Christine Cole
Posted by developer:
 
SHUTDOWN statement revisions: 
https://mydocs.mysql.oraclecorp.com/staging-tree/refman-8.0/en/html-web/shutdown.html. 
https://mydocs.mysql.oraclecorp.com/staging-tree/refman-5.7/en/html-web/shutdown.html

Links are to the internal documentation builds. Documentation publishing will resume 
with the release of 8.0.26.