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

SQL OOM triggered by JSON comparision where escaping expands string was: by JSON_EXTRACT

    XMLWordPrintable

Details

    Description

      Hi,

      The following test case can trigger an OOM:

      SELECT
        JSON_EXTRACT(
          CONVERT(0x7B2261223A22D4D4227D USING cp1251),
          '$.a'
        ) = CONVERT(0xD4D4 USING cp1251)
      ;
      

      This is the output:

      ERROR 1037 (HY001) at line 5: Out of memory; restart server and try again (needed 2 bytes)
      

      I can reproduce this with the commit version f6e44c1b7819f9befa3824f07866822288231528 of MariaDB server in github repo.

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              ChiZhang Chi Zhang
              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.