Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/06/2011, 08:09
wchiquito
 
Fecha de Ingreso: junio-2011
Mensajes: 139
Antigüedad: 12 años, 10 meses
Puntos: 42
Mensaje Respuesta: Obtener relacion de categorias en busqueda de productos

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.
...