Bug #114913 FLUSH PRIVILEGES statements ?!?!?
Submitted: 7 May 16:25 Modified: 8 May 14:25
Reporter: Jean-François Gagné Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[7 May 16:25] Jean-François Gagné
Description:
Hi,

"What Is New in MySQL 8.4 since MySQL 8.0" [1] and "Changes in MySQL 8.4.0" [2] mention the new FLUSH_PRIVILEGES privilege.  Both mention "FLUSH PRIVILEGES statements" where I think this should read "FLUSH statements".  Quotes below, look for [sic] for what I think are mistakes.

> FLUSH_PRIVILEGES privilege.  A new privilege is added in MySQL 8.4.0 specifically to allow use of FLUSH PRIVILEGES [sic] statements. Unlike the RELOAD privilege, the FLUSH_PRIVILEGES privilege applies only to FLUSH PRIVILEGES [sic] statements.

> Important Change: This release adds a privilege which is specific to the use of the FLUSH PRIVILEGES [sic] statements. Unlike the existing RELOAD privilege, the new FLUSH_PRIVILEGES privilege applies only to FLUSH PRIVILEGES [sic] statements. This privilege is global in scope, and is applicable to users and roles.
>
> The RELOAD privilege continues to be supported in this capacity to provide backwards compatibility; users having this privilege can still execute FLUSH PRIVILEGES [sic] statements following an upgrade. As part of upgrading to a MySQL 8.4 release, a check is performed to see whether there are any users having the FLUSH_PRIVILEGES privilege; if there are none, users having the RELOAD privilege are automatically assigned the new privilege as well. (WL #16044)

Somehow related, in above quote, I guess "there are any users having the FLUSH_PRIVILEGES privilege" should be "there are any users having the RELOAD privilege" (no user can have the FLUSH_PRIVILEGES privilege as it was introduced in 8.4).

Many thanks for looking into this,

Jean-François Gagné

How to repeat:
Check the doc.
[7 May 16:49] Jean-François Gagné
Hum, I might have mis-understood the FLUSH_PRIVILEGES privilege.  I thought it was for running FLUSH, but it looks like it is only to run FLUSH PRIVILEDGE.  So the "FLUSH PRIVILEGES statements" is actually ok.  This leaves us with "there are any users having the FLUSH_PRIVILEGES privilege" which should be changed to "there are any users having the RELOAD privilege".

Sorry for my confusion.
[8 May 6:36] MySQL Verification Team
Hello Jean-François,

Thank you for the report and feedback.

regards,
Umesh
[8 May 14:25] Jon Stephens
Not a bug. The text is correct as written: The check is performed when upgrading to any 8.4 version, not only to 8.4.0. If there are no users with the FLUSH_PRIVILEGES privilege, users having RELOAD have the new privilege assigned to them.

Thanks!