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

Wrong results with xmltype as a virtual column

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Blocker
    • Resolution: Unresolved
    • 12.3
    • 12.3
    • XML
    • None

    Description

      For invalid xml the row is holding the xml from previous rows

      CREATE TABLE t1(a VARCHAR(50), b XMLTYPE AS (a) VIRTUAL);
      INSERT INTO t1(a) VALUES('<yyyyyyyyy>xxxxxxxxxxxxxxxxxxx</yyyyyyyyy>');
      INSERT INTO t1(a) VALUES('a');
      INSERT INTO t1(a) VALUES('b');
      INSERT INTO t1(a) VALUES('<dddddddddd>tttttttttttttttttttttt</dddddddddd>');
      INSERT INTO t1(a) VALUES('e');
       
      SELECT * FROM t1;
      DROP TABLE t1;
      

      MariaDB [test]> SELECT * FROM t1;
      +-------------------------------------------------+-------------------------------------------------+
      | a                                               | b                                               |
      +-------------------------------------------------+-------------------------------------------------+
      | <yyyyyyyyy>xxxxxxxxxxxxxxxxxxx</yyyyyyyyy>      | <yyyyyyyyy>xxxxxxxxxxxxxxxxxxx</yyyyyyyyy>      |
      | a                                               | ayyyyyyyyy>xxxxxxxxxxxxxxxxxxx</yyyyyyyyy>      |
      | b                                               | byyyyyyyyy>xxxxxxxxxxxxxxxxxxx</yyyyyyyyy>      |
      | <dddddddddd>tttttttttttttttttttttt</dddddddddd> | <dddddddddd>tttttttttttttttttttttt</dddddddddd> |
      | e                                               | edddddddddd>tttttttttttttttttttttt</dddddddddd> |
      +-------------------------------------------------+-------------------------------------------------+
      5 rows in set, 3 warnings (0,001 sec)
       
      Warning (Code 1292): Incorrect XML value: 'a'
      Warning (Code 1292): Incorrect XML value: 'b'
      Warning (Code 1292): Incorrect XML value: 'e'
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              alice Alice Sherepa
              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.