Bug #93426 8.0.13 introduced new "volatile" variable

Submitted: 30 Nov 2018 12:03 Modified: 10 Oct 2025 8:06
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S3 (Non-critical)
Version:8.0.13 OS:Any
Assigned to: CPU Architecture:Any

[30 Nov 2018 12:03] Laurynas Biveinis
Description:
mysqld.h: extern volatile bool password_require_current;
mysqld.cc: volatile bool password_require_current = false;

It's 2018, C++11 has a memory model, volatile variables should be removed from the codebase, not being added to it.

Introduced by WL#11544:

commit 114de32fbc0dbcbd183840d69d77e8d0d9d0ab16
Author: Rahul Sisondia <rahul.sisondia@oracle.com>
Date:   Mon Jun 25 06:23:07 2018 +0200

    WL#11544 Current password required for SET PASSWORD
    ...

How to repeat:
See above

Suggested fix:
std::atomic<bool> if existing synchronization is not enough?
[30 Nov 2018 12:12] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback!

regards,
Umesh
[10 Oct 2025 8:06] Georgi Kodinov
Posted by developer:
 
This variable is no longer volatile in trunk.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.