mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed BUG#3132: Stored function returns empty when used in union.
This commit is contained in:
@ -1353,6 +1353,13 @@ drop procedure bug2564_1|
|
|||||||
drop procedure bug2564_2|
|
drop procedure bug2564_2|
|
||||||
drop function bug2564_3|
|
drop function bug2564_3|
|
||||||
drop function bug2564_4|
|
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|
|
drop table if exists fac|
|
||||||
create table fac (n int unsigned not null primary key, f bigint unsigned)|
|
create table fac (n int unsigned not null primary key, f bigint unsigned)|
|
||||||
create procedure ifac(n int unsigned)
|
create procedure ifac(n int unsigned)
|
||||||
|
@ -1551,6 +1551,15 @@ drop procedure bug2564_2|
|
|||||||
drop function bug2564_3|
|
drop function bug2564_3|
|
||||||
drop function bug2564_4|
|
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
|
# Some "real" examples
|
||||||
|
@ -3320,7 +3320,7 @@ Item_func_sp::fix_length_and_dec()
|
|||||||
switch (m_sp->result()) {
|
switch (m_sp->result()) {
|
||||||
case STRING_RESULT:
|
case STRING_RESULT:
|
||||||
maybe_null= 1;
|
maybe_null= 1;
|
||||||
max_length= 0;
|
max_length= MAX_BLOB_WIDTH;
|
||||||
break;
|
break;
|
||||||
case REAL_RESULT:
|
case REAL_RESULT:
|
||||||
decimals= NOT_FIXED_DEC;
|
decimals= NOT_FIXED_DEC;
|
||||||
|
Reference in New Issue
Block a user