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

COLUMN_JSON does not properly encode newlines

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 10.1, 10.1.23, 10.2
    • Fix Version/s: N/A
    • Component/s: Dynamic Columns
    • Labels:
      None
    • Environment:
      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

              Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              anthonyryan1 Anthony Ryan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration