Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-525

Request: Local Prepared Statements, prepared from Local Variables

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: 10.1
    • Component/s: None
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                f_razzoli Federico Razzoli
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 weeks
                  3w
                  Remaining:
                  Remaining Estimate - 3 weeks
                  3w
                  Logged:
                  Time Spent - Not Specified
                  Not Specified