maria-developers team mailing list archive
Mailing list archive
Re: Aggregate stored functions [MDEV-7773]
I understand that having a cursor like syntax we would have to write some
new code . What I would have liked to know is that the more details should
be discussed which need to be incorporated in the implementation of the
aggregate functions. Basically what I am asking is what all details have
to be there in the implementation of the aggregate functions.
On Fri, Mar 4, 2016 at 10:21 PM, Sergei Golubchik <serg@xxxxxxxxxxx> wrote:
> 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