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
b93aa71d
Commit
b93aa71d
authored
Jul 16, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
satisfy VC++
parent
0acde609
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
sql/sql_view.cc
sql/sql_view.cc
+5
-4
No files found.
sql/sql_view.cc
View file @
b93aa71d
...
...
@@ -53,6 +53,7 @@ int mysql_create_view(THD *thd,
/* first table in list is target VIEW name => cut off it */
TABLE_LIST
*
view
=
lex
->
unlink_first_table
(
&
link_to_local
);
TABLE_LIST
*
tables
=
lex
->
query_tables
;
TABLE_LIST
*
tbl
;
SELECT_LEX
*
select_lex
=
&
lex
->
select_lex
;
SELECT_LEX_UNIT
*
unit
=
&
lex
->
unit
;
int
res
=
0
;
...
...
@@ -73,7 +74,7 @@ int mysql_create_view(THD *thd,
0
,
0
)
||
grant_option
&&
check_grant
(
thd
,
CREATE_VIEW_ACL
,
view
,
0
,
1
,
0
))
DBUG_RETURN
(
1
);
for
(
TABLE_LIST
*
tbl
=
tables
;
tbl
;
tbl
=
tbl
->
next_local
)
for
(
tbl
=
tables
;
tbl
;
tbl
=
tbl
->
next_local
)
{
/*
Ensure that we have some privilage on this table, more strict check
...
...
@@ -128,7 +129,7 @@ int mysql_create_view(THD *thd,
if
(
&
lex
->
select_lex
!=
lex
->
all_selects_list
)
{
/* check tables of subqueries */
for
(
TABLE_LIST
*
tbl
=
tables
;
tbl
;
tbl
=
tbl
->
next_global
)
for
(
tbl
=
tables
;
tbl
;
tbl
=
tbl
->
next_global
)
{
if
(
!
tbl
->
table_in_first_from_clause
)
{
...
...
@@ -163,7 +164,7 @@ int mysql_create_view(THD *thd,
DBUG_RETURN
(
res
);
/* check that tables are not temporary */
for
(
TABLE_LIST
*
tbl
=
tables
;
tbl
;
tbl
=
tbl
->
next_global
)
for
(
tbl
=
tables
;
tbl
;
tbl
=
tbl
->
next_global
)
{
if
(
tbl
->
table
->
tmp_table
!=
NO_TMP_TABLE
&&
!
test
(
tbl
->
view
))
{
...
...
@@ -492,7 +493,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
}
TABLE_LIST
*
old_next
,
*
tbl_end
,
*
tbl_next
;
SELECT_LEX
*
end
,
*
next
;
SELECT_LEX
*
end
;
THD
*
thd
=
current_thd
;
LEX
*
old_lex
=
thd
->
lex
,
*
lex
;
int
res
=
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