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

COLUMN_JSON does not properly encode newlines

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • 10.1.23, 10.1(EOL), 10.2(EOL)
    • N/A
    • Dynamic Columns
    • None
    • Linux

    Description

      The JSON spec wants all newline characters encoded as "\n", COLUMN_JSON fails to encode newline characters properly.

      Minimal test case:

      SELECT COLUMN_JSON(COLUMN_CREATE("foo", "New
      line" AS CHAR));
      

      Current output:

      {"foo":"New
      line"}
      

      Expected output:

      {"foo":"New\nline"}
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              anthonyryan1 Anthony Ryan
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.