1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-14623: Output of show function code does not show FETCH GROUP NEXT ROW for custom aggregates

The print() function was missing from the FETCH GROUP NEXT ROW instrunction class, so there was no
output for this particular instruction when we use the query SHOW FUNCTION CODE function_name
This commit is contained in:
Varun Gupta
2018-05-18 17:42:12 +05:30
parent 89b1c2712a
commit 36779e624d
4 changed files with 51 additions and 2 deletions

View File

@ -1301,3 +1301,24 @@ Pos Instruction
28 jump 4
29 cpop 1
DROP PROCEDURE p1;
#
# MDEV-14623: Output of show function code does not show FETCH GROUP NEXT ROW
# for custom aggregates
#
create aggregate function f1(x INT) returns int
begin
declare continue handler for not found return 0;
loop
fetch group next row;
insert into t2 (sal) values (x);
end loop;
end|
show function code f1;
Pos Instruction
0 hpush_jump 2 1 CONTINUE
1 freturn int 0
2 agg_cfetch
3 stmt 5 "insert into t2 (sal) values (x)"
4 jump 2
5 hpop 1
drop function f1;