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

sql_mode=oracle does not support XMLAGG(), XMLELEMENT() and EXTRACT() XML functions

    XMLWordPrintable

Details

    • Q3/2025 Maintenance

    Description

      Most oracle applications use xml aggregation functions like XMLAGG() followed by identifying the XML elements XMLELEMENT() and then calling the EXTRACT() method to extract. This is important for Oracle migrations and is in use by many projects which are using XML in Oracle and are trying to Migrate to MariaDB.

      select
         deptno,
         rtrim (xmlagg (xmlelement (e, ename || ',')).extract ('//text()'), ',') enames
      from
         emp
      group by
         deptno
      ;
       
          DEPTNO ENAMES                                 
      ---------- ----------------------------------------
              10 CLARK,MILLER,KING                      
              20 SMITH,FORD,ADAMS,SCOTT,JONES           
              30 ALLEN,JAMES,TURNER,BLAKE,MARTIN,WARD 
      

      Reference: http://www.dba-oracle.com/t_xmlagg.htm

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              Faisal Faisal Saeed (Inactive)
              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.