mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Fixed BUG#3132: Stored function returns empty when used in union.
This commit is contained in:
parent
a3082cd3c9
commit
078f717804
3 changed files with 17 additions and 1 deletions
|
@ -1353,6 +1353,13 @@ drop procedure bug2564_1|
|
|||
drop procedure bug2564_2|
|
||||
drop function bug2564_3|
|
||||
drop function bug2564_4|
|
||||
create function bug3132(s char(20)) returns char(50)
|
||||
return concat('Hello, ', s, '!')|
|
||||
select bug3132('Bob') union all select bug3132('Judy')|
|
||||
bug3132('Bob')
|
||||
Hello, Bob!
|
||||
Hello, Judy!
|
||||
drop function bug3132|
|
||||
drop table if exists fac|
|
||||
create table fac (n int unsigned not null primary key, f bigint unsigned)|
|
||||
create procedure ifac(n int unsigned)
|
||||
|
|
|
@ -1551,6 +1551,15 @@ drop procedure bug2564_2|
|
|||
drop function bug2564_3|
|
||||
drop function bug2564_4|
|
||||
|
||||
#
|
||||
# BUG#3132
|
||||
#
|
||||
create function bug3132(s char(20)) returns char(50)
|
||||
return concat('Hello, ', s, '!')|
|
||||
|
||||
select bug3132('Bob') union all select bug3132('Judy')|
|
||||
drop function bug3132|
|
||||
|
||||
|
||||
#
|
||||
# Some "real" examples
|
||||
|
|
|
@ -3320,7 +3320,7 @@ Item_func_sp::fix_length_and_dec()
|
|||
switch (m_sp->result()) {
|
||||
case STRING_RESULT:
|
||||
maybe_null= 1;
|
||||
max_length= 0;
|
||||
max_length= MAX_BLOB_WIDTH;
|
||||
break;
|
||||
case REAL_RESULT:
|
||||
decimals= NOT_FIXED_DEC;
|
||||
|
|
Loading…
Reference in a new issue