Bug #2228 recursive stored procedure crashes
Submitted: 28 Dec 2003 12:31 Modified: 20 Jan 2004 3:29
Reporter: Georg Richter Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.0 OS:Linux (Linux)
Assigned to: Per-Erik Martin CPU Architecture:Any

[28 Dec 2003 12:31] Georg Richter
Description:
writing a stored procedure which call's itself crashes server.

How to repeat:
mysql> create procedure foo(a int) call foo(a);
Query OK, 0 rows affected (0.01 sec)

mysql> call foo(1);
/usr/local/mysql-5.0/bin/mysqld_safe: line 343:  4038 Speicherzugriffsfehler  $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking >>$err_log 2>&1

Number of processes running now: 1
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> mysqld process hanging, pid 4047 - killed
031228 21:29:48  mysqld restarted
[20 Jan 2004 3:29] Per-Erik Martin
This seems to work. That is, it runs for a long time, until it runs out of
system resources of one kind or another, with unpredictable results.