summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorpem@mysql.telia.com <>2003-10-03 17:38:12 +0200
committerpem@mysql.telia.com <>2003-10-03 17:38:12 +0200
commite8634f80bde84993c16043342742077ca2904881 (patch)
tree769eacf817cf9abb382f61d3cb1a090be509246b /mysql-test/t
parentdbf45cbc3c49f1a2e7afb3cb6da510e53249f852 (diff)
downloadmariadb-git-e8634f80bde84993c16043342742077ca2904881.tar.gz
Check that a FUNCTION contains RETURN and that we actually get a return value.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/sp-error.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index ab3ee6a9ac6..ba2805bfb0c 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -171,4 +171,27 @@ begin
end if;
end|
+--error 1296
+create function f(val int) returns int
+begin
+ declare x int;
+
+ set x = val+3;
+end|
+
+create function f(val int) returns int
+begin
+ declare x int;
+
+ set x = val+3;
+ if x < 4 then
+ return x;
+ end if;
+end|
+
+--error 1297
+select f(10)|
+
+drop function f|
+
delimiter ;|