diff options
author | Varun Gupta <varunraiko1803@gmail.com> | 2018-05-18 17:42:12 +0530 |
---|---|---|
committer | Varun Gupta <varunraiko1803@gmail.com> | 2018-05-19 15:12:15 +0530 |
commit | 36779e624d81fc1cad83b3de7401f0631fbb9a5a (patch) | |
tree | 71f0cd50d60780a5df1fa7f891ef0647fc7b1aa8 /mysql-test/main/sp-code.test | |
parent | 89b1c2712a9cff99f79d05362f4a0dc183738ba5 (diff) | |
download | mariadb-git-36779e624d81fc1cad83b3de7401f0631fbb9a5a.tar.gz |
MDEV-14623: Output of show function code does not show FETCH GROUP NEXT ROW for custom aggregates
The print() function was missing from the FETCH GROUP NEXT ROW instrunction class, so there was no
output for this particular instruction when we use the query SHOW FUNCTION CODE function_name
Diffstat (limited to 'mysql-test/main/sp-code.test')
-rw-r--r-- | mysql-test/main/sp-code.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/main/sp-code.test b/mysql-test/main/sp-code.test index 1f2f5191f0a..f8c1b4f0a92 100644 --- a/mysql-test/main/sp-code.test +++ b/mysql-test/main/sp-code.test @@ -927,3 +927,22 @@ $$ DELIMITER ;$$ SHOW PROCEDURE CODE p1; DROP PROCEDURE p1; + +--echo # +--echo # MDEV-14623: Output of show function code does not show FETCH GROUP NEXT ROW +--echo # for custom aggregates +--echo # + +delimiter |; +create aggregate function f1(x INT) returns int +begin + declare continue handler for not found return 0; + loop + fetch group next row; + insert into t2 (sal) values (x); + end loop; +end| + +delimiter ;| +show function code f1; +drop function f1; |