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
f72600ca
Commit
f72600ca
authored
Aug 07, 2006
by
evgen@sunlight.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge sunlight.local:/home/evgen/bk-trees/mysql-5.0
into sunlight.local:/local_work/leak_fix
parents
b9b2ef9c
854245e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
sql/sql_view.cc
sql/sql_view.cc
+13
-3
No files found.
sql/sql_view.cc
View file @
f72600ca
...
...
@@ -179,15 +179,23 @@ static bool
fill_defined_view_parts
(
THD
*
thd
,
TABLE_LIST
*
view
)
{
LEX
*
lex
=
thd
->
lex
;
bool
not_used
;
bool
free_view
=
1
;
TABLE_LIST
decoy
;
if
(
view
->
view
)
free_view
=
0
;
memcpy
(
&
decoy
,
view
,
sizeof
(
TABLE_LIST
));
if
(
!
open_table
(
thd
,
&
decoy
,
thd
->
mem_root
,
&
not_used
,
0
)
&&
!
decoy
.
view
)
if
((
decoy
.
table
=
open_table
(
thd
,
&
decoy
,
thd
->
mem_root
,
NULL
,
0
)))
{
/* It's a table */
my_free
((
gptr
)
decoy
.
table
,
MYF
(
0
));
my_error
(
ER_WRONG_OBJECT
,
MYF
(
0
),
view
->
db
,
view
->
table_name
,
"VIEW"
);
return
TRUE
;
}
if
(
!
decoy
.
view
)
/* An error while opening the view occurs, caller will handle it */
return
FALSE
;
if
(
!
lex
->
definer
)
{
view
->
definer
.
host
=
decoy
.
definer
.
host
;
...
...
@@ -199,6 +207,8 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view)
if
(
lex
->
create_view_suid
==
VIEW_SUID_DEFAULT
)
lex
->
create_view_suid
=
decoy
.
view_suid
?
VIEW_SUID_DEFINER
:
VIEW_SUID_INVOKER
;
if
(
free_view
)
delete
decoy
.
view
;
return
FALSE
;
}
...
...
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