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

Use my_vsnprintf extension %sQ where appropriate

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Trivial
    • Resolution: Unresolved
    • None
    • None

    Description

      The difference between literal-`%s` and %sQ is that the latter also “escapes” `’s into ``’s.

      Not all my_vsnprintf uses make use of this failsafe.
      Messages that prompt SQL content (e.g., database identifiers) should use %sQ’s so the quote is copy-pastable as-is.

      As MDEV-21978 updates, its Part 2 PR will make a list of my_vsnprintf-delegating functions visible from its changed files.
      I’ve marked MDEV-21978 as blocking this anyway as it adds %sQ (that deprecates the old %`s), available in preview soon™.

      Markdown formats back`tick as ``back`tick``, but I don’t think we care about those.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ParadoxV5 Jimmy Hú
              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.