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
a73d90e7
Commit
a73d90e7
authored
Aug 07, 2006
by
evgen@sunlight.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into sunlight.local:/local_work/leak_fix
parents
2f9a6c7c
854245e7
Changes
1
Hide 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 @
a73d90e7
...
...
@@ -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