mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-15118 ExtractValue(xml,something_complex) does not work
Item_xml_str_func::fix_fields() used a local "String tmp" as a buffer for args[1]->val_str(). "tmp" was freed at the end of fix_fields(), while Items created during my_xpath_parse() still pointed to its fragments. Adding a new member Item_xml_str_func::m_xpath_query and store the result of args[1]->val_str() into it.
This commit is contained in:
@@ -1268,5 +1268,17 @@ c1 c2
|
||||
2 b2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-15118 ExtractValue(xml,something_complex) does not work
|
||||
#
|
||||
CREATE TABLE t1 (a TEXT);
|
||||
INSERT INTO t1 VALUES (CONCAT('<a>aaa</a>'));
|
||||
SELECT ExtractValue(a, '/a') AS a FROM t1;
|
||||
a
|
||||
aaa
|
||||
SELECT ExtractValue(a, FROM_BASE64(TO_BASE64('/a'))) AS a FROM t1;
|
||||
a
|
||||
aaa
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user