mirror of
https://github.com/MariaDB/server.git
synced 2026-04-29 19:55:32 +02:00
xml.result, xml.test:
Adding test. item_xmlfunc.cc: Bug #18171 XML: ExtractValue: the XPath position() function crashes the server! Disallowing use of position() and last() without context. sql/item_xmlfunc.cc: Bug #18171 XML: ExtractValue: the XPath position() function crashes the server! Disallowing use of position() and last() without context. mysql-test/t/xml.test: Adding test. mysql-test/r/xml.result: Adding test.
This commit is contained in:
parent
4ac5afa3b9
commit
1dc87feb20
3 changed files with 17 additions and 2 deletions
|
|
@ -1141,13 +1141,15 @@ static Item *create_func_round(MY_XPATH *xpath, Item **args, uint nargs)
|
|||
|
||||
static Item *create_func_last(MY_XPATH *xpath, Item **args, uint nargs)
|
||||
{
|
||||
return new Item_func_xpath_count(xpath->context, xpath->pxml);
|
||||
return xpath->context ?
|
||||
new Item_func_xpath_count(xpath->context, xpath->pxml) : NULL;
|
||||
}
|
||||
|
||||
|
||||
static Item *create_func_position(MY_XPATH *xpath, Item **args, uint nargs)
|
||||
{
|
||||
return new Item_func_xpath_position(xpath->context, xpath->pxml);
|
||||
return xpath->context ?
|
||||
new Item_func_xpath_position(xpath->context, xpath->pxml) : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue