I am attempting to use a custom aggregate function but am running into errors with permissions. I have attempted to grant full access to my user via the root user but still no success. I’ve also tried creating as root and running as root - encountering the same error.
I am running 6.7.4.
I get the following error, after what seems like a normal amount of time for the query to complete:
Leaf Error (…:3307): EXECUTE command denied to user ‘…’@’%’ for function ‘X_terminate’
My aggregate is defined as:
CREATE AGGREGATE X_udaf(…) RETURNS DECIMAL
WITH STATE RECORD(…)
INITIALIZE WITH X_init
ITERATE WITH X_iter
MERGE WITH X_merge
TERMINATE WITH X_terminate;
The terminate is created like so:
CREATE FUNCTION X_terminate(state RECORD(…)) RETURNS DECIMAL AS
BEGIN RETURN 1;
I’ve tried many forms of: grant execute on mydb.* to ‘myuser’@’%’;
None seem to get me past this error. Any recommendations on how to proceed?