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

$$ "Full-Escape" Syntax for mysql CLI and mysqltest

    XMLWordPrintable

Details

    Description

      With thanks to bar for the great idea, this feature request to implement $$ syntax markers in the mysql client (and mysqltest), which would avoid the need for any delimiter inside them. This would allow single-line CREATE PROCEDURE statements (very handy for QA and MTR tests etc.) and other goodies like not having to change delimiters, being able to insert binary data directly, etc.

      CREATE PROCEDURE p() $$ BEGIN; BEGIN; SELECT 1; END; END; $$;
      

      SELECT $$ some_binary_data $$;
      

      etc.

      PostgreSQL also has something like this in $$ (as does Bash from memory, with a different syntax):
      https://www.postgresonline.com/journal/archives/376-Dollar-quoting-for-escaping-single-quotes.html
      https://www.postgresql.org/docs/current/plpgsql-development-tips.html#PLPGSQL-QUOTE-TIPS

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.