Hi Alexander!

Can you double check that this same problem doesn't occur with custom aggregate functions? There is a switch involved with cursors and custom aggregate functions here: 

  /* Only pop cursors when we're done with group aggregate running. */
  if (m_chistics.agg_type != GROUP_AGGREGATE ||
      (m_chistics.agg_type == GROUP_AGGREGATE && thd->spcont->quit_func))
    thd->spcont->pop_all_cursors(thd); // To avoid memory leaks after an error

That may require a different approach.

Vicențiu


On Tue, 26 Jun 2018 at 13:44 Alexander Barkov <bar@mariadb.com> wrote:
Hello Sanja,

Please review a patch for MDEV-16584.

Thanks!
_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp