Commit 77a9429c authored by acurtis@xiphis.org's avatar acurtis@xiphis.org

Bug#7648 - Stored procedure crash when invoking a function that returns a bit

  bugfix 9102 corrected the crashing, this corrects the result.
parent f638e5cb
......@@ -2964,4 +2964,10 @@ select bug9102();
drop function bug9102|
bug9102()
a
drop procedure if exists bug7648|
create function bug7648() returns bit(8) return 'a'|
select bug7648()|
bug7648()
a
drop function bug7648|
drop table t1,t2;
......@@ -3627,16 +3627,29 @@ set global query_cache_size = @qcs1|
delete from t1|
drop function bug9902|
#
# BUG#9102: New bug synopsis
# BUG#9102: Stored proccedures: function which returns blob causes crash
#
--disable_warnings
drop function if exists bug9102|
--enable_warnings
create function bug9102() returns blob return 'a'|
select bug9102();
select bug9102()|
drop function bug9102|
#
# BUG#7648: Stored procedure crash when invoking a function that returns a bit
#
--disable_warnings
drop procedure if exists bug7648|
--enable_warnings
create function bug7648() returns bit(8) return 'a'|
select bug7648()|
drop function bug7648|
#
# BUG#NNNN: New bug synopsis
#
......
......@@ -1308,7 +1308,17 @@ class Item_func_sp :public Item_func
longlong val_int()
{
return (longlong)Item_func_sp::val_real();
Item *it;
longlong l;
if (execute(&it))
{
null_value= 1;
return 0LL;
}
l= it->val_int();
null_value= it->null_value;
return l;
}
double val_real()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment