[MDEV-14623] Output of show function code does not show FETCH GROUP NEXT ROW for custom aggregates Created: 2017-12-11  Updated: 2018-05-19  Resolved: 2018-05-19

Status: Closed
Project: MariaDB Server
Component/s: Stored routines
Affects Version/s: 10.3
Fix Version/s: 10.3.7

Type: Bug Priority: Critical
Reporter: Varun Gupta (Inactive) Assignee: Varun Gupta (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 10.3.6-1

 Description   

create aggregate function f1(x INT) returns double
begin
declare z double default 0;
declare continue handler for not found return z;
loop
fetch group next row;
set z = z + x;
end loop;
end|

show function code f1;
Pos	Instruction
0	set z@1 0
1	hpush_jump 3 2 CONTINUE
2	freturn double z@1
3	
4	set z@1 z@1 + x@0
5	jump 3
6	hpop 1



 Comments   
Comment by Varun Gupta (Inactive) [ 2017-12-29 ]

http://lists.askmonty.org/pipermail/commits/2017-December/011768.html

Comment by Vicențiu Ciorbaru [ 2018-05-18 ]

Let's try and follow cfetch syntax somewhat. Let's name the instruction agg_cfetch. Ok to push.

Generated at Thu Feb 08 08:15:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.