← Back to team overview

maria-developers team mailing list archive

Re: Aggregate stored functions [MDEV-7773]


Hi, Varun!

On Mar 04, Varun Gupta wrote:
> With the syntax more or less clear to us, can we have a discussion about
> how we have to go on with the implementation for the aggregate functions.
> Firstly I thought I should look at the implementation of CREATE FUNCTION,
> any other suggestions ?

Sure, why not. But, as you've seen, that suggested syntax is almost
identical to the standard one, so hopefully it'll need very little
changes to the current CREATE FUNCTION implementation.

More important would be to look at the function execution (not
definition). This mainly happens in sql/sp_head.cc but other sql/sp_*
files are also used.

This cursor-like syntax introduces an new mode of executing stored
routines. Currently, a routine (a procedure or a function) is executed
completely from the beginning to the end. But with this cursor-like
syntax, the server will need to start executing a stored function, stop
at the FETCH statement, postpone the execution, then later continue from
that point. There is no code to do it now.

Chief Architect MariaDB
and security@xxxxxxxxxxx

Follow ups