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
c54d1292
Commit
c54d1292
authored
Oct 31, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postreview fixes
parent
1137a376
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
14 deletions
+8
-14
sql/item_func.cc
sql/item_func.cc
+2
-4
sql/sql_acl.cc
sql/sql_acl.cc
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+2
-4
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/table.cc
sql/table.cc
+2
-4
No files found.
sql/item_func.cc
View file @
c54d1292
...
...
@@ -4756,13 +4756,12 @@ Item_func_sp::execute(Item **itp)
THD
*
thd
=
current_thd
;
int
res
=
-
1
;
Sub_statement_state
statement_state
;
Security_context
*
save_security_ctx
=
0
,
*
save_ctx_func
;
Security_context
*
save_security_ctx
=
thd
->
security_ctx
,
*
save_ctx_func
;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if
(
context
->
security_ctx
)
{
/* Set view definer security context */
save_security_ctx
=
thd
->
security_ctx
;
thd
->
security_ctx
=
context
->
security_ctx
;
}
#endif
...
...
@@ -4787,8 +4786,7 @@ Item_func_sp::execute(Item **itp)
#ifndef NO_EMBEDDED_ACCESS_CHECKS
sp_restore_security_context
(
thd
,
save_ctx_func
);
error:
if
(
save_security_ctx
)
thd
->
security_ctx
=
save_security_ctx
;
thd
->
security_ctx
=
save_security_ctx
;
#else
error:
#endif
...
...
sql/sql_acl.cc
View file @
c54d1292
...
...
@@ -3532,7 +3532,7 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
of other queries). For simple queries first_not_own_table is 0.
*/
for
(
i
=
0
,
table
=
tables
;
table
&&
table
!=
first_not_own_table
&&
i
<
number
;
table
!=
first_not_own_table
&&
i
<
number
;
table
=
table
->
next_global
,
i
++
)
{
/* Remove SHOW_VIEW_ACL, because it will be checked during making view */
...
...
sql/sql_base.cc
View file @
c54d1292
...
...
@@ -2705,16 +2705,14 @@ static bool check_grant_column_in_sctx(THD *thd, GRANT_INFO *grant,
{
if
(
!
check_grants
)
return
FALSE
;
Security_context
*
save_security_ctx
=
0
;
Security_context
*
save_security_ctx
=
thd
->
security_ctx
;
bool
res
;
if
(
sctx
)
{
save_security_ctx
=
thd
->
security_ctx
;
thd
->
security_ctx
=
sctx
;
}
res
=
check_grant_column
(
thd
,
grant
,
db
,
table
,
name
,
length
);
if
(
save_security_ctx
)
thd
->
security_ctx
=
save_security_ctx
;
thd
->
security_ctx
=
save_security_ctx
;
return
res
;
}
#endif
...
...
sql/sql_parse.cc
View file @
c54d1292
...
...
@@ -5033,7 +5033,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
the given table list refers to the list for prelocking (contains tables
of other queries). For simple queries first_not_own_table is 0.
*/
for
(;
tables
&&
tables
!=
first_not_own_table
;
tables
=
tables
->
next_global
)
for
(;
tables
!=
first_not_own_table
;
tables
=
tables
->
next_global
)
{
if
(
tables
->
schema_table
&&
(
want_access
&
~
(
SELECT_ACL
|
EXTRA_ACL
|
FILE_ACL
)))
...
...
sql/table.cc
View file @
c54d1292
...
...
@@ -2654,7 +2654,7 @@ Natural_join_column::check_grants(THD *thd, const char *name, uint length)
GRANT_INFO
*
grant
;
const
char
*
db_name
;
const
char
*
table_name
;
Security_context
*
save_security_ctx
=
0
;
Security_context
*
save_security_ctx
=
thd
->
security_ctx
;
Security_context
*
new_sctx
=
table_ref
->
security_ctx
;
bool
res
;
...
...
@@ -2675,12 +2675,10 @@ Natural_join_column::check_grants(THD *thd, const char *name, uint length)
if
(
new_sctx
)
{
save_security_ctx
=
thd
->
security_ctx
;
thd
->
security_ctx
=
new_sctx
;
}
res
=
check_grant_column
(
thd
,
grant
,
db_name
,
table_name
,
name
,
length
);
if
(
save_security_ctx
)
thd
->
security_ctx
=
save_security_ctx
;
thd
->
security_ctx
=
save_security_ctx
;
return
res
;
}
#endif
...
...
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