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
fa8e3ce6
Commit
fa8e3ce6
authored
Oct 06, 2011
by
Tatjana Azundris Nuernberg
Browse files
Options
Browse Files
Download
Plain Diff
manual merge
parents
7944320f
d740f9e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
sql/sql_view.cc
sql/sql_view.cc
+10
-9
No files found.
sql/sql_view.cc
View file @
fa8e3ce6
...
...
@@ -1281,22 +1281,23 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
with "security_ctx" member set to 0, i.e. forcing check_table_access()
to use active user's security context.
There is no need for creating similar copies of table list elements
for underlying tables since they are just have been constructed and
thus have TABLE_LIST::security_ctx == 0 and fresh TABLE_LIST::grant
member.
There is no need for creating similar copies of TABLE_LIST elements
for underlying tables since they just have been constructed and thus
have TABLE_LIST::security_ctx == 0 and fresh TABLE_LIST::grant member.
Finally at this point making sure we have SHOW_VIEW_ACL on the views
will suffice as we implicitly require SELECT_ACL anyway.
*/
TABLE_LIST
view
;
bzero
((
char
*
)
&
view
,
sizeof
(
TABLE_LIST
));
view
.
db
=
table
->
db
;
view
.
table_name
=
table
->
table_name
;
TABLE_LIST
view_no_suid
;
bzero
(
static_cast
<
void
*>
(
&
view_no_suid
),
sizeof
(
TABLE_LIST
));
view_no_suid
.
db
=
table
->
db
;
view_no_suid
.
table_name
=
table
->
table_name
;
DBUG_ASSERT
(
view_tables
==
NULL
||
view_tables
->
security_ctx
==
NULL
);
if
(
check_table_access
(
thd
,
SELECT_ACL
,
view_tables
,
UINT_MAX
,
TRUE
)
||
check_table_access
(
thd
,
SHOW_VIEW_ACL
,
&
view
,
UINT_MAX
,
TRUE
))
check_table_access
(
thd
,
SHOW_VIEW_ACL
,
&
view
_no_suid
,
UINT_MAX
,
TRUE
))
{
my_message
(
ER_VIEW_NO_EXPLAIN
,
ER
(
ER_VIEW_NO_EXPLAIN
),
MYF
(
0
));
goto
err
;
...
...
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