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
1e9b5cea
Commit
1e9b5cea
authored
Aug 24, 2006
by
evgen@sunlight.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
view.result, view.test:
Corrected test case for the bug#21261 sql_parse.cc: Corrected fix for bug#21261
parent
39d0ef17
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
mysql-test/r/view.result
mysql-test/r/view.result
+1
-0
mysql-test/t/view.test
mysql-test/t/view.test
+1
-0
sql/sql_parse.cc
sql/sql_parse.cc
+13
-2
No files found.
mysql-test/r/view.result
View file @
1e9b5cea
...
...
@@ -2861,6 +2861,7 @@ GRANT SELECT ON t2 TO 'user21261'@'localhost';
INSERT INTO v1 (x) VALUES (5);
UPDATE v1 SET x=1;
GRANT SELECT ON v1 TO 'user21261'@'localhost';
GRANT SELECT ON t1 TO 'user21261'@'localhost';
UPDATE v1,t2 SET x=1 WHERE x=y;
SELECT * FROM t1;
x
...
...
mysql-test/t/view.test
View file @
1e9b5cea
...
...
@@ -2740,6 +2740,7 @@ INSERT INTO v1 (x) VALUES (5);
UPDATE
v1
SET
x
=
1
;
CONNECTION
root
;
GRANT
SELECT
ON
v1
TO
'user21261'
@
'localhost'
;
GRANT
SELECT
ON
t1
TO
'user21261'
@
'localhost'
;
CONNECTION
user21261
;
UPDATE
v1
,
t2
SET
x
=
1
WHERE
x
=
y
;
CONNECTION
root
;
...
...
sql/sql_parse.cc
View file @
1e9b5cea
...
...
@@ -5099,10 +5099,21 @@ bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *all_tables)
return
1
;
/* Check rights on tables of subselects and implictly opened tables */
TABLE_LIST
*
subselects_tables
;
TABLE_LIST
*
subselects_tables
,
*
view
=
all_tables
->
view
?
all_tables
:
0
;
if
((
subselects_tables
=
all_tables
->
next_global
))
{
if
((
check_table_access
(
thd
,
SELECT_ACL
,
subselects_tables
,
0
)))
/*
Access rights asked for the first table of a view should be the same
as for the view
*/
if
(
view
&&
subselects_tables
->
belong_to_view
==
view
)
{
if
(
check_single_table_access
(
thd
,
privilege
,
subselects_tables
))
return
1
;
subselects_tables
=
subselects_tables
->
next_global
;
}
if
(
subselects_tables
&&
(
check_table_access
(
thd
,
SELECT_ACL
,
subselects_tables
,
0
)))
return
1
;
}
return
0
;
...
...
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