Oracle XMLCONCAT()函数-Oracle版本19c中缺少标记名



当我在Oracle 19c上运行第一个SQL查询时,<strange_elem>缺少。为什么?是Oracle漏洞吗?

SQL*Plus: Release 12.1.0.2.0 Production on Wed Jul 22 10:46:19 2020
Copyright (c) 1982, 2014, Oracle.  All rights reserved.
Last Successful login time: Wed Jul 22 2020 10:31:51 +02:00
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
sql> -- missing <strange_elem> !!!
sql> SELECT
  2     Xmlforest(
  3          xmlconcat(xmlelement("data", 'abc')) as "strange_elem"
  4          ,dbms_utility.get_time  "next"
  5      )||' ' result
  6      FROM dual;
RESULT
----------------------------------------------------------------------------------------------------
<data>abc</data><next>1036336429</next>
sql> -- <strange_elem> is present when <next> elem is ommited
sql> SELECT
  2     Xmlforest(
  3          xmlconcat(xmlelement("data", 'abc')) as "strange_elem"
  4      )||' ' result
  5      FROM dual;
RESULT
----------------------------------------------------------------------------------------------------
<strange_elem><data>abc</data></strange_elem>
sql> -- <strange_elem> is present when <next> elem value is not function, but hard coded value !
sql> SELECT
  2     Xmlforest(
  3          xmlconcat(xmlelement("data", 'abc')) as "strange_elem"
  4          ,'1' "next"
  5      )||' ' result
  6      FROM dual;
RESULT
----------------------------------------------------------------------------------------------------
<strange_elem><data>abc</data></strange_elem><next>1</next>

在Oracle12c上,我在所有3个SQL查询中都得到了相同的结果<strange_elem>结果中存在。

检查此文档ID 2716320.1并应用补丁

最新更新