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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ed6ad7d3
Commit
ed6ad7d3
authored
May 15, 2006
by
kroki@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix possible race. Use LOCK_grant on access to grant_version.
parent
0963c705
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
sql/sql_acl.cc
sql/sql_acl.cc
+3
-2
No files found.
sql/sql_acl.cc
View file @
ed6ad7d3
...
...
@@ -6009,20 +6009,21 @@ void fill_effective_table_privileges(THD *thd, GRANT_INFO *grant,
}
/* table privileges */
rw_rdlock
(
&
LOCK_grant
);
if
(
grant
->
version
!=
grant_version
)
{
rw_rdlock
(
&
LOCK_grant
);
grant
->
grant_table
=
table_hash_search
(
sctx
->
host
,
sctx
->
ip
,
db
,
sctx
->
priv_user
,
table
,
0
);
/* purecov: inspected */
grant
->
version
=
grant_version
;
/* purecov: inspected */
rw_unlock
(
&
LOCK_grant
);
}
if
(
grant
->
grant_table
!=
0
)
{
grant
->
privilege
|=
grant
->
grant_table
->
privs
;
}
rw_unlock
(
&
LOCK_grant
);
DBUG_PRINT
(
"info"
,
(
"privilege 0x%lx"
,
grant
->
privilege
));
DBUG_VOID_RETURN
;
}
...
...
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