<p>MySQL error 1444 (ER_PS_NO_RECURSION) occurs when a prepared statement calls a stored routine that, directly or indirectly, executes the same prepared statement, creating disallowed recursion.</p>
<p>MySQL Error 1444: ER_PS_NO_RECURSION happens when a prepared statement invokes a stored routine that triggers the same statement, creating a prohibited recursion loop. Remove the recursive call or rewrite the logic to stop the prepared statement from re-executing itself to resolve the issue.</p>
The prepared statement contains a stored routine call
Error 1444 appears with the message "The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner."
The server blocks execution because recursion through prepared statements can lock resources indefinitely and destabilize the query cache.
The error surfaces the moment MySQL detects that a prepared statement would re-enter itself, either directly or through nested stored routines, during runtime.
It is version-agnostic and affects MySQL 5.6, 5.7, 8.0, and compatible MariaDB builds whenever prepared statements and stored routines combine improperly.
Unresolved, the statement never runs, breaking application workflows and delaying transactions.
Leaving the logic unchanged risks masking deeper design flaws that may surface as deadlocks or stack overflow in future upgrades.
A prepared statement invokes a procedure that immediately tries to execute the same prepared statement again.
Procedure A calls Procedure B, which executes the prepared statement that originally called Procedure A, forming a loop.
Dynamic SQL inside routines constructs and runs the prepared statement name stored in a variable, unintentionally creating recursion.
A trigger fired by the prepared statement executes a routine that calls the statement back.
Occurs when deleting a parent row referenced by foreign keys. Unlike 1444, it concerns referential integrity, not recursion.
Triggers on inserting a child row without a matching parent. Also foreign-key related, but not prepared statement specific.
Signals a missing RETURN statement in a stored function. Deals with routine definition errors, not runtime recursion.
Raised when a stored procedure attempts an illegal SELECT into a variable. Focuses on result-set handling.
No. The MySQL server hard-codes this restriction to protect stability. You must rewrite the SQL.
Generally no, because the recursion path uses stored routines or triggers to loop back to the same statement.
No. The server blocks recursion at the logical level, so stack size is irrelevant.
Galaxy’s query dependency graph visualizes which routines and statements call each other, making recursion easy to spot and eliminate.