[MDEV-22774] Invalid use of aggregate function in SP is not detected at CREATE time Created: 2020-06-02  Updated: 2020-06-03

Status: Open
Project: MariaDB Server
Component/s: Stored routines
Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.5

Type: Bug Priority: Minor
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-14347 CREATE PROCEDURE returns no error whe... Closed

 Description   

CREATE OR REPLACE FUNCTION f1() RETURNS INT RETURN SUM(1);
SELECT f1();

ERROR 1111 (HY000): Invalid use of group function

CREATE OR REPLACE FUNCTION f1() RETURNS INT RETURN ROW_NUMBER() OVER();
SELECT f1();

ERROR 4015 (HY000): Window function is allowed only in SELECT list and ORDER BY clause

It should report the error at creation rather than execution time.


Generated at Thu Feb 08 09:17:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.