Bug #116737 Change the types of all ACL variables to Access_bitmask
| Submitted: | 21 Nov 2024 2:37 | Modified: | 6 Feb 2025 22:33 |
|---|---|---|---|
| Reporter: | Mike Wang (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Security: Privileges | Severity: | S3 (Non-critical) |
| Version: | 9.1.0 | OS: | Any |
| Assigned to: | Georgi Kodinov | CPU Architecture: | Any |
| Tags: | Contribution | ||
[21 Nov 2024 3:15]
Mike Wang
PR: https://github.com/mysql/mysql-server/pull/579
[21 Nov 2024 15:46]
OCA Admin
Contribution submitted via Github - Bug#116737: Change the types of all ACL variables to Access_bitmask (*) Contribution by Mike Wang (Github MikeWang000000, mysql-server/pull/579): https://bugs.mysql.com/bug.php?id=116737 I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: git_patch_2191183011.txt (text/plain), 6.62 KiB.
[24 Nov 2024 9:12]
MySQL Verification Team
Hello Mike Wang, Thank you for the report and contribution. regards, Umesh
[6 Feb 2025 22:33]
Jon Stephens
Documented fix as follows in the MySQL 9.3.0 changelog:
The types of all ACL variables used internally have been changed
to Access_bitmask.
Our thanks to Mike Wang for the contribution.
Closed.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.057 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.
Description: Related to Bug#35507223 and commit 89c0115d873016f23003603d042155cbf2287571 @Daniel Blanchard This change made all ACL bitmask variables explicitly 32 bits, but there are still some variables left not changed to `Access_bitmask`. I suggest changing them all to `Access_bitmask` for safety and maintainability. How to repeat: mkdir build cd build sed -i 's/" -Werror"/" -Wconversion"/g' ../cmake/maintainer.cmake cmake .. -DCMAKE_INSTALL_PREFIX="$HOME/mysql" -DWITH_DEBUG=1 make -j$(nproc) 2>build.stderr.log grep 'warning:.*Access_bitmask' build.stderr.log | sort -u Suggested fix: The build logs are as below. Fix them by changing the variable types to `Access_bitmask`. /home/repo/mysql-server/sql/auth/partial_revokes.cc:188:43: warning: conversion from ‘long unsigned int’ to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/event_data_objects.cc:1203:70: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/event_data_objects.cc:1211:50: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/server_component/persistent_dynamic_loader.cc:159:35: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/sql_db.cc:1369:52: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/sql_insert.cc:1061:44: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/sql_insert.cc:1061:55: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/sql_insert.cc:439:35: warning: conversion from ‘ulong’ {aka ‘long unsigned int’} to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/sql_parse.cc:1802:64: warning: conversion from ‘long unsigned int’ to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/sql_update.cc:150:36: warning: conversion from ‘long int’ to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion] /home/repo/mysql-server/sql/sql_update.cc:152:35: warning: conversion from ‘long int’ to ‘Access_bitmask’ {aka ‘unsigned int’} may change value [-Wconversion]