-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDEV-5228 Fix incorrect message on a failed attempt to revoke grants from a role #3114
base: 10.5
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note its failing to compile on embedded. Some use of #ifdef NO_EMBEDDED_ACCESS_CHECKS
I think is required.
/home/buildbot/amd64-fedora-38-last-N-failed/build/sql/sql_acl.cc:88:13: error: ‘void my_error_wrapper_for_proc_grant(bool, const char*, const char*, const char*)’ defined but not used [-Werror=unused-function]
88 | static void my_error_wrapper_for_proc_grant(bool is_role, const char* user_or_role, const char* host, const char* routine)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/buildbot/amd64-fedora-38-last-N-failed/build/sql/sql_acl.cc:80:13: error: ‘void my_error_wrapper_for_table_grant(bool, const char*, const char*, const char*)’ defined but not used [-Werror=unused-function]
80 | static void my_error_wrapper_for_table_grant(bool is_role, const char* user_or_role, const char* host, const char* table)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/buildbot/amd64-fedora-38-last-N-failed/build/sql/sql_acl.cc:72:13: error: ‘void my_error_wrapper_for_grant(bool, const char*, const char*)’ defined but not used [-Werror=unused-function]
72 | static void my_error_wrapper_for_grant(bool is_role, const char* user_or_role, const char* host)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [libmysqld/CMakeFiles/sql_embedded.dir/build.make:1056: libmysqld/CMakeFiles/sql_embedded.dir/__/sql/sql_acl.cc.o] Error 1
Test result look good.
Sorry for the slow review.
As a bug fix I think 10.5 is a better target. @cvicentiu happy with that?
f24c9b4
to
ca5ff4d
Compare
…from a role Ensure that when there is a failed attempt to revoke a grant for a role, the error message indicates that the failure was on a role instead of a user. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
ca5ff4d
to
695320d
Compare
Changed the target to 10.5 and put the new code inside of the NO_EMBEDDED_ACCESS_CHECKS macro to resolve the compilation error. |
Description
Ensure that when there is a failed attempt to revoke a grant for a role, the error message indicates that the failure was
on a role instead of a user.
Release Notes
Ensure that when there is a failed attempt to revoke a grant for a role, the error message indicates that the failure was on a role instead of a user.
How can this PR be tested?
Existing MTR tests that reference grant error messages were run and failing tests were modified accordingly. To this end, the following test suites were run:
Additionally manual testing was performed as in the manner described in https://jira.mariadb.org/browse/MDEV-5228. See results for before and after below.
Before
After
If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.
Basing the PR against the correct MariaDB version
PR quality check
Copyright
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.