Hola,
Las funciones almacenadas (stored functions) recursivas no están permitidas, pero los procedimientos almacenados (stored procedures) si pueden ser recursivos.
En el manual se indica lo siguiente:
Cita: [url=http://dev.mysql.com/doc/refman/5.5/en/stored-routines-syntax.html]17.2.1. Stored Routine Syntax[/url]
...
Stored functions cannot be recursive.
Recursion in stored procedures is permitted but disabled by default. To enable recursion, set the [url=http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_sp_recursion_depth]max_sp_recursion_depth[/url] server system variable to a value greater than zero. Stored procedure recursion increases the demand on thread stack space. If you increase the value of [url=http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_max_sp_recursion_depth]max_sp_recursion_depth[/url], it may be necessary to increase thread stack size by increasing the value of [url=http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_thread_stack]thread_stack[/url] at server startup. See [url=http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html]Section 5.1.3, “Server System Variables”[/url], for more information.
...