Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
07581249
Commit
07581249
authored
Sep 26, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-29632 SUPER users created before 10.11 should retain READ_ONLY ADMIN privilege upon upgrade
parent
e30f30d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
mysql-test/suite/sys_vars/r/read_only_grant.result
mysql-test/suite/sys_vars/r/read_only_grant.result
+9
-0
mysql-test/suite/sys_vars/t/read_only_grant.test
mysql-test/suite/sys_vars/t/read_only_grant.test
+8
-0
sql/sql_acl.cc
sql/sql_acl.cc
+5
-0
No files found.
mysql-test/suite/sys_vars/r/read_only_grant.result
View file @
07581249
...
@@ -29,3 +29,12 @@ ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SE
...
@@ -29,3 +29,12 @@ ERROR HY000: Variable 'read_only' is a GLOBAL variable and should be set with SE
disconnect user1;
disconnect user1;
connection default;
connection default;
DROP USER user1@localhost;
DROP USER user1@localhost;
#
# MDEV-29632 SUPER users created before 10.11 should retain READ_ONLY ADMIN privilege upon upgrade
#
insert mysql.global_priv values ('bar', 'foo', '{"access":32768,"version_id":101000,"plugin":"mysql_native_password","authentication_string":""}');
flush privileges;
show grants for foo@bar;
Grants for foo@bar
GRANT SUPER, READ_ONLY ADMIN ON *.* TO `foo`@`bar`
drop user foo@bar;
mysql-test/suite/sys_vars/t/read_only_grant.test
View file @
07581249
...
@@ -35,3 +35,11 @@ SET SESSION read_only=0;
...
@@ -35,3 +35,11 @@ SET SESSION read_only=0;
--
disconnect
user1
--
disconnect
user1
--
connection
default
--
connection
default
DROP
USER
user1
@
localhost
;
DROP
USER
user1
@
localhost
;
--
echo
#
--
echo
# MDEV-29632 SUPER users created before 10.11 should retain READ_ONLY ADMIN privilege upon upgrade
--
echo
#
insert
mysql
.
global_priv
values
(
'bar'
,
'foo'
,
'{"access":32768,"version_id":101000,"plugin":"mysql_native_password","authentication_string":""}'
);
flush
privileges
;
show
grants
for
foo
@
bar
;
drop
user
foo
@
bar
;
sql/sql_acl.cc
View file @
07581249
...
@@ -1532,6 +1532,11 @@ class User_table_json: public User_table
...
@@ -1532,6 +1532,11 @@ class User_table_json: public User_table
{
{
privilege_t
mask
=
ALL_KNOWN_ACL_100304
;
privilege_t
mask
=
ALL_KNOWN_ACL_100304
;
ulonglong
orig_access
=
access
;
ulonglong
orig_access
=
access
;
if
(
version_id
<
101100
)
{
if
(
access
&
SUPER_ACL
)
access
|=
READ_ONLY_ADMIN_ACL
;
}
if
(
version_id
>=
100509
)
if
(
version_id
>=
100509
)
{
{
mask
=
ALL_KNOWN_ACL_100509
;
mask
=
ALL_KNOWN_ACL_100509
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment