List:Commits« Previous MessageNext Message »
From:pem Date:January 19 2006 4:55pm
Subject:bk commit into 5.0 tree (pem:1.1994) BUG#15866
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of pem. When pem does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1994 06/01/19 17:55:54 pem@stripped +4 -0
  Fixed BUG#15866: Thread stack limit insufficient for recursive call "fib(20)"
    Lowered the parameter to 10, and also renamed non-standard table names to t3.

  mysql-test/t/sp_trans.test
    1.7 06/01/19 17:55:50 pem@stripped +1 -1
    Added drop of t3 for safety. (Might be left from sp.test after certain test failures.)

  mysql-test/t/sp.test
    1.171 06/01/19 17:55:50 pem@stripped +24 -23
    Renamed fac, primes and fib tables to t3.
    Lowered fib() test parameter to 10 (20 hit the stack overrun check on some machines).

  mysql-test/r/sp_trans.result
    1.7 06/01/19 17:55:50 pem@stripped +1 -1
    Updated results.

  mysql-test/r/sp.result
    1.182 06/01/19 17:55:50 pem@stripped +23 -23
    Updated results.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	pem
# Host:	pem.mysql.com
# Root:	/extern/mysql/work/bug15866/mysql-5.0

--- 1.181/mysql-test/r/sp.result	2006-01-17 19:10:41 +01:00
+++ 1.182/mysql-test/r/sp.result	2006-01-19 17:55:50 +01:00
@@ -1178,8 +1178,8 @@
 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 @@
 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 @@
 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 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 @@
 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 @@
 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 @@
 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 @@
 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)|
+delete from t3|
+insert into t3 values (0), (1)|
 call fib(20)|
-select * from fib order by f asc|
+select * from t3 order by f asc|
 f
 0
 1
@@ -1381,7 +1381,7 @@
 2584
 4181
 6765
-drop table fib|
+drop table t3|
 drop procedure fib|
 set @@max_sp_recursion_depth= 0|
 drop procedure if exists bar|

--- 1.170/mysql-test/t/sp.test	2006-01-17 12:44:48 +01:00
+++ 1.171/mysql-test/t/sp.test	2006-01-19 17:55:50 +01:00
@@ -1419,9 +1419,9 @@
 # fac
 
 --disable_warnings
-drop table if exists fac|
+drop table if exists t3|
 --enable_warnings
-create table fac (n int unsigned not null primary key, f bigint unsigned)|
+create table t3 (n int unsigned not null primary key, f bigint unsigned)|
 
 --disable_warnings
 drop procedure if exists ifac|
@@ -1435,15 +1435,15 @@
   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|
-drop table fac|
+select * from t3|
+drop table t3|
 --replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
 show function status like '%f%'|
 drop procedure ifac|
@@ -1455,15 +1455,15 @@
 # primes
 
 --disable_warnings
-drop table if exists primes|
+drop table if exists t3|
 --enable_warnings
 
-create table primes (
+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),
@@ -1492,7 +1492,7 @@
       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;
@@ -1523,7 +1523,7 @@
 
       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;
@@ -1545,8 +1545,8 @@
 #    45    211
 #   100    557
 #   199   1229
-select * from primes where i=45 or i=100 or i=199|
-drop table primes|
+select * from t3 where i=45 or i=100 or i=199|
+drop table t3|
 drop procedure opp|
 drop procedure ip|
 --replace_column 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00'
@@ -1556,9 +1556,9 @@
 # Fibonacci, for recursion test. (Yet Another Numerical series :)
 #
 --disable_warnings
-drop table if exists fib|
+drop table if exists t3|
 --enable_warnings
-create table fib ( f bigint unsigned not null )|
+create table t3 ( f bigint unsigned not null )|
 
 # We deliberately do it the awkward way, fetching the last two
 # values from the table, in order to exercise various statements
@@ -1571,13 +1571,13 @@
   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;
@@ -1588,22 +1588,23 @@
 
 # Minimum test: recursion of 3 levels
 
-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|
 
-delete from fib|
+delete from t3|
 
-# Original test: 20 levels (may run into memory limits!)
+# The original test, 20 levels, ran into memory limits on some machines
+# and builds. Try 10 instead...
 
-insert into fib values (0), (1)|
+insert into t3 values (0), (1)|
 
 call fib(20)|
 
-select * from fib order by f asc|
-drop table fib|
+select * from t3 order by f asc|
+drop table t3|
 drop procedure fib|
 set @@max_sp_recursion_depth= 0|
 

--- 1.6/mysql-test/r/sp_trans.result	2005-11-23 11:56:45 +01:00
+++ 1.7/mysql-test/r/sp_trans.result	2006-01-19 17:55:50 +01:00
@@ -1,4 +1,4 @@
-drop table if exists t1, t2;
+drop table if exists t1, t2, t3;
 drop procedure if exists bug8850|
 create table t1 (a int) engine=innodb|
 create procedure bug8850()

--- 1.6/mysql-test/t/sp_trans.test	2005-11-23 11:56:46 +01:00
+++ 1.7/mysql-test/t/sp_trans.test	2006-01-19 17:55:50 +01:00
@@ -5,7 +5,7 @@
 -- source include/have_innodb.inc
 
 --disable_warnings
-drop table if exists t1, t2;
+drop table if exists t1, t2, t3;
 --enable_warnings
 
 delimiter |;
Thread
bk commit into 5.0 tree (pem:1.1994) BUG#15866pem19 Jan