summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-error.test
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2006-02-09 13:00:32 +0100
committerunknown <pem@mysql.com>2006-02-09 13:00:32 +0100
commit0fd784928c340968967a104dd0191837549ee8a3 (patch)
treef93894a80801e8bd4b71a67e4687a69be4eb237c /mysql-test/t/sp-error.test
parent5ffc2dc202e49607b91851f3e44f60f49f175294 (diff)
downloadmariadb-git-0fd784928c340968967a104dd0191837549ee8a3.tar.gz
Fixed BUG#16896: Stored function: unused AGGREGATE-clause in CREATE FUNCTION
Check if AGGREGATE was given with a stored (non-UDF) function, and return error in that case. Also made udf_example/udf_test work again, by adding a missing *_init() function. (_init() functions required unless --allow_suspicious_udfs is given to the server, since March 2005 - it seems udf_example wasn't updated at the time.) mysql-test/r/sp-error.result: Updated results for BUG#16896. mysql-test/t/sp-error.test: Added test case for BUG#16896. sql/share/errmsg.txt: New error message: ER_SP_NO_AGGREGATE sql/sql_yacc.yy: Check if AGGREGATE was used when creating a stored function (i.e. not an UDF). sql/udf_example.cc: Added myfunc_int_init() function to make it work when the server is running without --allow_suspicious_udfs.
Diffstat (limited to 'mysql-test/t/sp-error.test')
-rw-r--r--mysql-test/t/sp-error.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index e1839b4b98f..c4745537de3 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -1704,9 +1704,21 @@ drop procedure bug15091;
#
+# BUG#16896: Stored function: unused AGGREGATE-clause in CREATE FUNCTION
+#
+--disable_warnings
+drop function if exists bug16896;
+--enable_warnings
+
+--error ER_SP_NO_AGGREGATE
+create aggregate function bug16896() returns int return 1;
+
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
#drop procedure if exists bugNNNN|
#--enable_warnings
#create procedure bugNNNN...
+