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

Local Prepared Statements, prepared from Local Variables

    XMLWordPrintable

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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.