Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
N/A
-
None
-
None
Description
Item_func_xml_method_getRootElement::val_str() and Item_func_xml_method_getNamespace::val_str() return the caller's str after str->set() points it into the variable's value, so str does not own its buffer (alloced_length()==0). Item_func_concat::realloc_result() then calls str->alloc(), which empties the string before appending the next argument.
--delimiter $$
|
CREATE PROCEDURE p1() |
BEGIN
|
DECLARE x XMLTYPE DEFAULT '<pk xmlns="pns"/>'; |
SELECT CONCAT(x.getRootElement(), ',z') c1, |
CONCAT(x.getNamespace(), ',z') c2, |
CONCAT(x.getRootElement(), x.getRootElement()) c3;
|
END$$ |
--delimiter ;
|
--echo # BUG if not pk,z pns,z pkpk
|
CALL p1();
|
DROP PROCEDURE p1; |
Actual:
c1 c2 c3
|
,z ,z pk
|
Attachments
Issue Links
- relates to
-
MDEV-36261 XMLTYPE: methods - step 1
-
- In Testing
-