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

XMLISVALID does not convert its arguments to a common charset

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • N/A
    • 13.3
    • XML Functions
    • None

    Description

      The parser receives the raw bytes of each argument. A utf16/utf32 document, a utf16 schema, or a document and schema in different charsets give wrong results or a parse error.

      --disable_abort_on_error
      SET @s= '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="a" type="xs:string"/></xs:schema>';
      --echo # BUG if 0
      SELECT XMLISVALID(CONVERT('<a>x</a>' USING utf16), @s), XMLISVALID(CONVERT('<a>x</a>' USING utf32), @s);
      --echo # BUG if 0
      SELECT XMLISVALID(_latin1 X'3CE92F3E', CONCAT(_utf8mb4 '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="', _utf8mb4 X'C3A9', '" type="xs:string"/></xs:schema>'));
      --echo # BUG if error
      SELECT XMLISVALID('<a>x</a>', CONVERT(@s USING utf16));

      Actual: 0 0, 0, then ERROR HY000: Incorrect XML value: 'XML Schema parse error at line 1 pos 4: unknown token unexpected (ident or '/' wanted)'.

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.