Details
-
Task
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Support the syntax (subject to discussion):
[begin_label:]
|
FOR GROUP ROWS DO |
statement_list
|
END FOR [ end_label ] |
See also MDEV-14415.
Example:
CREATE AGGREGATE FUNCTION avg(x DOUBLE) RETURNS DOUBLE |
BEGIN
|
DECLARE count INT DEFAULT 0; |
DECLARE sum DOUBLE DEFAULT 0; |
FOR GROUP ROWS DO |
SET count:=count+1; |
SET sum:=sum+x; |
END FOR; |
RETURN sum/count; |
END |
Attachments
Issue Links
- is blocked by
-
MDEV-14415 Add Oracle-style FOR loop to sql_mode=DEFAULT
- Closed
- relates to
-
MDEV-7773 Aggregate stored functions
- Closed