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

Engine CONNECT incorrectly reads values from XML

    XMLWordPrintable

Details

    Description

      When testing Engine CONNECT XML, I noticed that values have incorrect output if one of the elements is not present when the "Mulnode" option is used.

      I create the table "xml_sample":

      CREATE OR REPLACE TABLE xml_sample (
       Country_code CHAR(50) xpath='@code',
       Country_name CHAR(50) xpath='@name',
       City_code CHAR(50) xpath='City/@code',
       City_name CHAR(50) xpath='City/@name',
       City_population NUMBER(10) NULL `xpath`='City/@population' 
       ) ENGINE=CONNECT table_type=XML FILE_NAME='C:/XML/MariaDB/Sample_data.xml'
      tabname='W' option_list='rownode=C,Expand=1,Mulnode=City,Limit=10';
      

      In the Xml there is a parameter "population" which is missing in one of the lines. And the result shows that one line is missing, and even worse, that there is no line, not the one for which parameters are missing, but the "population" record is moved up and the first lines are output.
      Files and illustration are attached.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Justinas Bagdonas Justinas Bagdonas
            Votes:
            1 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.