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
19e558a0
Commit
19e558a0
authored
Apr 19, 2006
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into mysql.com:/home/dlenev/mysql-5.0-bg16021
parents
b128fa10
868ffcca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
8 deletions
+42
-8
mysql-test/r/sp.result
mysql-test/r/sp.result
+10
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+18
-0
sql/item_func.cc
sql/item_func.cc
+14
-8
No files found.
mysql-test/r/sp.result
View file @
19e558a0
...
@@ -4848,4 +4848,14 @@ c 2
...
@@ -4848,4 +4848,14 @@ c 2
b 3
b 3
a 1
a 1
delete from t1|
delete from t1|
drop procedure if exists bug18787|
create procedure bug18787()
begin
declare continue handler for sqlexception begin end;
select no_such_function();
end|
call bug18787()|
no_such_function()
NULL
drop procedure bug18787|
drop table t1,t2;
drop table t1,t2;
mysql-test/t/sp.test
View file @
19e558a0
...
@@ -5698,6 +5698,24 @@ select * from t1 order by @x|
...
@@ -5698,6 +5698,24 @@ select * from t1 order by @x|
delete
from
t1
|
delete
from
t1
|
#
# BUG#18787: Server crashed when calling a stored procedure containing
# a misnamed function
#
--
disable_warnings
drop
procedure
if
exists
bug18787
|
--
enable_warnings
create
procedure
bug18787
()
begin
declare
continue
handler
for
sqlexception
begin
end
;
select
no_such_function
();
end
|
call
bug18787
()
|
drop
procedure
bug18787
|
#
#
# BUG#NNNN: New bug synopsis
# BUG#NNNN: New bug synopsis
#
#
...
...
sql/item_func.cc
View file @
19e558a0
...
@@ -4744,7 +4744,9 @@ Item_func_sp::sp_result_field(void) const
...
@@ -4744,7 +4744,9 @@ Item_func_sp::sp_result_field(void) const
share
->
table_cache_key
=
empty_name
;
share
->
table_cache_key
=
empty_name
;
share
->
table_name
=
empty_name
;
share
->
table_name
=
empty_name
;
}
}
field
=
m_sp
->
create_result_field
(
max_length
,
name
,
dummy_table
);
if
(
!
(
field
=
m_sp
->
create_result_field
(
max_length
,
name
,
dummy_table
)))
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
DBUG_RETURN
(
field
);
DBUG_RETURN
(
field
);
}
}
...
@@ -4772,8 +4774,9 @@ Item_func_sp::execute(Field **flp)
...
@@ -4772,8 +4774,9 @@ Item_func_sp::execute(Field **flp)
{
{
if
(
!
(
*
flp
=
f
=
sp_result_field
()))
if
(
!
(
*
flp
=
f
=
sp_result_field
()))
{
{
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
/* Error set by sp_result_field() */
return
0
;
null_value
=
1
;
return
TRUE
;
}
}
f
->
move_field
((
f
->
pack_length
()
>
sizeof
(
result_buf
))
?
f
->
move_field
((
f
->
pack_length
()
>
sizeof
(
result_buf
))
?
...
@@ -4928,16 +4931,19 @@ longlong Item_func_found_rows::val_int()
...
@@ -4928,16 +4931,19 @@ longlong Item_func_found_rows::val_int()
Field
*
Field
*
Item_func_sp
::
tmp_table_field
(
TABLE
*
t_arg
)
Item_func_sp
::
tmp_table_field
(
TABLE
*
t_arg
)
{
{
Field
*
res
=
0
;
Field
*
field
=
0
;
DBUG_ENTER
(
"Item_func_sp::tmp_table_field"
);
DBUG_ENTER
(
"Item_func_sp::tmp_table_field"
);
if
(
m_sp
)
if
(
m_sp
)
res
=
m_sp
->
create_result_field
(
max_length
,
(
const
char
*
)
name
,
t_arg
);
field
=
m_sp
->
create_result_field
(
max_length
,
(
const
char
*
)
name
,
t_arg
);
if
(
!
res
)
if
(
!
field
)
res
=
Item_func
::
tmp_table_field
(
t_arg
);
field
=
Item_func
::
tmp_table_field
(
t_arg
);
DBUG_RETURN
(
res
);
if
(
!
field
)
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
DBUG_RETURN
(
field
);
}
}
...
...
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