summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp.test
diff options
context:
space:
mode:
authorjoerg@trift-lap.fambruehe <>2005-05-07 18:06:02 +0200
committerjoerg@trift-lap.fambruehe <>2005-05-07 18:06:02 +0200
commit84af50133bc4dbe99b90a2e89b5ea442ef2003ea (patch)
treee37a177d4b6d663033aa1b61d6bdd4356dbdae9d /mysql-test/t/sp.test
parent3196a0103964a71bb8af4d4366e6906de2d53507 (diff)
downloadmariadb-git-84af50133bc4dbe99b90a2e89b5ea442ef2003ea.tar.gz
Corrections to test "sp", stored procedure "fib" (see entry 9937 in the bug DB).
Diffstat (limited to 'mysql-test/t/sp.test')
-rw-r--r--mysql-test/t/sp.test18
1 files changed, 15 insertions, 3 deletions
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 77fe5ab7601..b4066df1666 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -1634,8 +1634,6 @@ drop table if exists fib|
--enable_warnings
create table fib ( f bigint unsigned not null )|
-insert into fib values (1), (1)|
-
# We deliberately do it the awkward way, fetching the last two
# values from the table, in order to exercise various statements
# and table accesses at each turn.
@@ -1644,7 +1642,7 @@ drop procedure if exists fib|
--enable_warnings
create procedure fib(n int unsigned)
begin
- if n > 0 then
+ if n > 1 then
begin
declare x, y bigint unsigned;
declare c cursor for select f from fib order by f desc limit 2;
@@ -1659,6 +1657,20 @@ begin
end if;
end|
+# Minimum test: recursion of 3 levels
+
+insert into fib values (0), (1)|
+
+call fib(3)|
+
+select * from fib order by f asc|
+
+delete from fib|
+
+# Original test: 20 levels (may run into memory limits!)
+
+insert into fib values (0), (1)|
+
call fib(20)|
select * from fib order by f asc|