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
80491609
Commit
80491609
authored
Dec 10, 2018
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-17946 : Unsorted acl_dbs after RENAME USER
parent
34eb9838
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
mysql-test/main/grant.result
mysql-test/main/grant.result
+9
-0
mysql-test/main/grant.test
mysql-test/main/grant.test
+11
-0
sql/sql_acl.cc
sql/sql_acl.cc
+2
-0
No files found.
mysql-test/main/grant.result
View file @
80491609
...
...
@@ -2770,3 +2770,12 @@ CREATE USER bar2@localhost;
RENAME USER foo@localhost TO bar1@localhost, bar1@localhost TO bar3@localhost;
DROP USER bar2@localhost;
DROP USER bar3@localhost;
#
# MDEV-17946 : Unsorted acl_dbs after RENAME USER
#
CREATE USER foo;
GRANT SELECT ON test.* TO foo;
RENAME USER '' TO 'name';
GRANT UPDATE ON test.* TO foo;
RENAME USER 'name' to '';
DROP USER foo;
mysql-test/main/grant.test
View file @
80491609
...
...
@@ -2267,3 +2267,14 @@ CREATE USER bar2@localhost;
RENAME
USER
foo
@
localhost
TO
bar1
@
localhost
,
bar1
@
localhost
TO
bar3
@
localhost
;
DROP
USER
bar2
@
localhost
;
DROP
USER
bar3
@
localhost
;
--
echo
#
--
echo
# MDEV-17946 : Unsorted acl_dbs after RENAME USER
--
echo
#
CREATE
USER
foo
;
GRANT
SELECT
ON
test
.*
TO
foo
;
RENAME
USER
''
TO
'name'
;
GRANT
UPDATE
ON
test
.*
TO
foo
;
RENAME
USER
'name'
to
''
;
DROP
USER
foo
;
sql/sql_acl.cc
View file @
80491609
...
...
@@ -10368,6 +10368,8 @@ bool mysql_rename_user(THD *thd, List <LEX_USER> &list)
rebuild_acl_users
();
}
/* Rebuild 'acl_dbs' since 'acl_users' has been modified */
rebuild_acl_dbs
();
/* Rebuild 'acl_check_hosts' since 'acl_users' has been modified */
rebuild_check_host
();
...
...
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