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

Dynamic SQL: DEFAULT as a bind parameter

    XMLWordPrintable

Details

    Description

      In addition to expressions, we'll allow DEFAULT as a dynamic SQL parameter:

      EXECUTE IMMEDIATE examples

      EXECUTE IMMEDIATE 'INSERT INTO t1 VALUES(?)' USING DEFAULT;
      EXECUTE IMMEDIATE 'UPDATE t1 SET a=?' USING DEFAULT;
      

      PREPARE..EXECUTE examples

      PREPARE stmt FROM 'INSERT INTO t1 VALUES(?)';
      EXECUTE stmt USING DEFAULT;
      PREPARE stmt FROM  'UPDATE t1 SET a=?';
      EXECUTE stmt USING DEFAULT;
      

      This is for symmetry with the STMT_INDICATOR_DEFAULT indicator in the client-server bind protocol.

      MDEV-11359 will also use this MDEV to add INGORE as another possible bind parameter, equal to STMT_INDICATOR_INGORE.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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