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
a01f9d5b
Commit
a01f9d5b
authored
Jun 29, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed SP parameter execution
parent
230fe0d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
sql/sp_head.cc
sql/sp_head.cc
+8
-8
sql/sql_union.cc
sql/sql_union.cc
+1
-0
No files found.
sql/sp_head.cc
View file @
a01f9d5b
...
...
@@ -735,11 +735,10 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount, Item **resp)
init_alloc_root
(
&
call_mem_root
,
MEM_ROOT_BLOCK_SIZE
,
0
);
thd
->
set_n_backup_item_arena
(
&
call_arena
,
&
backup_arena
);
// QQ Should have some error checking here? (types, etc...)
nctx
=
new
sp_rcontext
(
csize
,
hmax
,
cmax
);
nctx
->
callers_mem_root
=
backup_arena
.
mem_root
;
nctx
->
callers_mem_root
=
thd
->
mem_root
;
for
(
i
=
0
;
i
<
argcount
;
i
++
)
{
sp_pvar_t
*
pvar
=
m_pcont
->
find_pvar
(
i
);
...
...
@@ -765,6 +764,9 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount, Item **resp)
}
}
thd
->
spcont
=
nctx
;
thd
->
set_n_backup_item_arena
(
&
call_arena
,
&
backup_arena
);
/* mem_root was moved to backup_arena */
DBUG_ASSERT
(
nctx
->
callers_mem_root
==
backup_arena
.
mem_root
);
ret
=
execute
(
thd
);
...
...
@@ -834,7 +836,6 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
}
init_alloc_root
(
&
call_mem_root
,
MEM_ROOT_BLOCK_SIZE
,
0
);
thd
->
set_n_backup_item_arena
(
&
call_arena
,
&
backup_arena
);
if
(
csize
>
0
||
hmax
>
0
||
cmax
>
0
)
{
...
...
@@ -899,12 +900,11 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
}
if
(
!
ret
)
{
thd
->
set_n_backup_item_arena
(
&
call_arena
,
&
backup_arena
);
ret
=
execute
(
thd
);
// Partially restore context now.
// We still need the call mem root and free list for processing
// of out parameters.
thd
->
restore_backup_item_arena
(
&
call_arena
,
&
backup_arena
);
thd
->
restore_backup_item_arena
(
&
call_arena
,
&
backup_arena
);
}
if
(
!
ret
&&
csize
>
0
)
{
...
...
sql/sql_union.cc
View file @
a01f9d5b
...
...
@@ -646,6 +646,7 @@ bool st_select_lex::cleanup()
if
(
join
)
{
DBUG_ASSERT
((
st_select_lex
*
)
join
->
select_lex
==
this
);
error
|=
join
->
destroy
();
delete
join
;
join
=
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