diff options
Diffstat (limited to 'mysql-test/main/custom_aggregate_functions.test')
-rw-r--r-- | mysql-test/main/custom_aggregate_functions.test | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/mysql-test/main/custom_aggregate_functions.test b/mysql-test/main/custom_aggregate_functions.test index ab799b48bdb..a10ea44af60 100644 --- a/mysql-test/main/custom_aggregate_functions.test +++ b/mysql-test/main/custom_aggregate_functions.test @@ -965,3 +965,54 @@ select i, sum(i) from t1 group by i with rollup; # Cleanup drop function agg_sum; drop table t1; + + +--echo # +--echo # MDEV-18813 PROCEDURE and anonymous blocks silently ignore FETCH GROUP NEXT ROW +--echo # + + +DELIMITER $$; +--error ER_NOT_AGGREGATE_FUNCTION +CREATE PROCEDURE p1() +BEGIN + FETCH GROUP NEXT ROW; +END; +$$ +DELIMITER ;$$ + + +DELIMITER $$; +--error ER_NOT_AGGREGATE_FUNCTION +BEGIN NOT ATOMIC + FETCH GROUP NEXT ROW; +END; +$$ +DELIMITER ;$$ + + +DELIMITER $$; +--error ER_NOT_AGGREGATE_FUNCTION +CREATE DEFINER=root@localhost FUNCTION f1() RETURNS INT +BEGIN + FETCH GROUP NEXT ROW; + RETURN 0; +END; +$$ +DELIMITER ;$$ + + +CREATE TABLE t1 (a INT); +--error ER_NOT_AGGREGATE_FUNCTION +CREATE TRIGGER tr1 + AFTER INSERT ON t1 FOR EACH ROW + FETCH GROUP NEXT ROW; +DROP TABLE t1; + + +--error ER_NOT_AGGREGATE_FUNCTION +CREATE EVENT ev1 + ON SCHEDULE EVERY 1 HOUR + STARTS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + ENDS CURRENT_TIMESTAMP + INTERVAL 1 MONTH + INTERVAL 1 WEEK +DO FETCH GROUP NEXT ROW; |