Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
A Prepared Statement is visible from the whole session, and must be prepared from a Session Variable. This means that:
- A query calling the routine XXX() must not rely on the same string variables (if they set a value, this value could be overwritten with a statement to be prepared) and the same prepared statements;
- The same applies to other routines, which call XXX() or are called by XXX().
But the developers who writes XXX() should not be forced to read YYY() or the queries which call XXX(). XXX may have been developed time ago by someone else, or I may write it and want to include it in an open source library.
The problem would be solved if you make it possible to:
- PREPARE a statement FROM a local variable (defined in the routine's body)
- define a LOCAL prepared statement, which is not visible by other routines/statements.
I hope that this request is easy to satisfy.