summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r--mysql-test/r/sp.result58
1 files changed, 24 insertions, 34 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index a025c0503cd..ea4420c8e70 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -1178,8 +1178,8 @@ drop view v2|
delete from t1 |
delete from t2 |
drop table t4|
-drop table if exists fac|
-create table fac (n int unsigned not null primary key, f bigint unsigned)|
+drop table if exists t3|
+create table t3 (n int unsigned not null primary key, f bigint unsigned)|
drop procedure if exists ifac|
create procedure ifac(n int unsigned)
begin
@@ -1189,13 +1189,13 @@ set n = 20; # bigint overflow otherwise
end if;
while i <= n do
begin
-insert into test.fac values (i, fac(i));
+insert into test.t3 values (i, fac(i));
set i = i + 1;
end;
end while;
end|
call ifac(20)|
-select * from fac|
+select * from t3|
n f
1 1
2 2
@@ -1217,7 +1217,7 @@ n f
18 6402373705728000
19 121645100408832000
20 2432902008176640000
-drop table fac|
+drop table t3|
show function status like '%f%'|
Db Name Type Definer Modified Created Security_type Comment
test fac FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
@@ -1225,12 +1225,12 @@ drop procedure ifac|
drop function fac|
show function status like '%f%'|
Db Name Type Definer Modified Created Security_type Comment
-drop table if exists primes|
-create table primes (
+drop table if exists t3|
+create table t3 (
i int unsigned not null primary key,
p bigint unsigned not null
)|
-insert into primes values
+insert into t3 values
( 0, 3), ( 1, 5), ( 2, 7), ( 3, 11), ( 4, 13),
( 5, 17), ( 6, 19), ( 7, 23), ( 8, 29), ( 9, 31),
(10, 37), (11, 41), (12, 43), (13, 47), (14, 53),
@@ -1253,7 +1253,7 @@ set b = b+200, s = 0;
else
begin
declare p bigint unsigned;
-select t.p into p from test.primes t where t.i = s;
+select t.p into p from test.t3 t where t.i = s;
if b+p > r then
set pp = 1;
leave again;
@@ -1278,7 +1278,7 @@ begin
declare pp bool default 0;
call opp(p, pp);
if pp then
-insert into test.primes values (i, p);
+insert into test.t3 values (i, p);
set i = i+1;
end if;
set p = p+2;
@@ -1299,7 +1299,7 @@ set b = b+200, s = 0;
else
begin
declare p bigint unsigned;
-select t.p into p from test.primes t where t.i = s;
+select t.p into p from test.t3 t where t.i = s;
if b+p > r then
set pp = 1;
leave again;
@@ -1318,47 +1318,47 @@ Db Name Type Definer Modified Created Security_type Comment
test ip PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
test opp PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
call ip(200)|
-select * from primes where i=45 or i=100 or i=199|
+select * from t3 where i=45 or i=100 or i=199|
i p
45 211
100 557
199 1229
-drop table primes|
+drop table t3|
drop procedure opp|
drop procedure ip|
show procedure status like '%p%'|
Db Name Type Definer Modified Created Security_type Comment
-drop table if exists fib|
-create table fib ( f bigint unsigned not null )|
+drop table if exists t3|
+create table t3 ( f bigint unsigned not null )|
drop procedure if exists fib|
create procedure fib(n int unsigned)
begin
if n > 1 then
begin
declare x, y bigint unsigned;
-declare c cursor for select f from fib order by f desc limit 2;
+declare c cursor for select f from t3 order by f desc limit 2;
open c;
fetch c into y;
fetch c into x;
close c;
-insert into fib values (x+y);
+insert into t3 values (x+y);
call fib(n-1);
end;
end if;
end|
set @@max_sp_recursion_depth= 20|
-insert into fib values (0), (1)|
+insert into t3 values (0), (1)|
call fib(3)|
-select * from fib order by f asc|
+select * from t3 order by f asc|
f
0
1
1
2
-delete from fib|
-insert into fib values (0), (1)|
-call fib(20)|
-select * from fib order by f asc|
+delete from t3|
+insert into t3 values (0), (1)|
+call fib(10)|
+select * from t3 order by f asc|
f
0
1
@@ -1371,17 +1371,7 @@ f
21
34
55
-89
-144
-233
-377
-610
-987
-1597
-2584
-4181
-6765
-drop table fib|
+drop table t3|
drop procedure fib|
set @@max_sp_recursion_depth= 0|
drop procedure if exists bar|