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

JSON output routines do not check the validity of strings in the same way that JSON_VALID() does.

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4, 10.5, 10.6, 10.8, 10.9, 10.10, 10.11
    • 10.4, 10.5, 10.6, 10.11
    • Optimizer
    • None

    Description

      JSON output strings need checking in the same manner as the check performed by JSON_VALID().
      Unicode. Currently UTF8mb3:

      MariaDB [test]> show create table information_schema.optimizer_trace\G
      *************************** 1. row ***************************
             Table: OPTIMIZER_TRACE
      Create Table: CREATE TEMPORARY TABLE `OPTIMIZER_TRACE` (
        `QUERY` longtext NOT NULL,
        `TRACE` longtext NOT NULL,
        `MISSING_BYTES_BEYOND_MAX_MEM_SIZE` int(20) NOT NULL,
        `INSUFFICIENT_PRIVILEGES` tinyint(1) NOT NULL
      ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci PAGE_CHECKSUM=0
      1 row in set (0.004 sec)
      

      (maybe we should change that to be UTF8MB4 in the next versions...)

      Some characters need to be escaped, according to https://www.json.org/json-en.html, see the production for String.

      Attachments

        Activity

          People

            Johnston Rex Johnston
            Johnston Rex Johnston
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.