Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19162 Some basic datatypes and functions in oracle compatibility mode do not work
  3. MDEV-20658

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

    XMLWordPrintable

Details

    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

        Activity

          People

            Unassigned Unassigned
            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.