-
unknown authored
xml.result, xml.test: Adding test case. item_xmlfunc.cc: - adding "size" member into MY_XPATH_FLT struct, to pass parent's context size when iterating in a predicate. Previously, temporaty context size was calculated instead, which is always 1. As a result, things like last() and count() didn't work fine. - adding iteration into Item_func_xpath_elementbyindex: similar to Item_func_xpath_predicate. This is to make things like last() and count() work inside square brackets. sql/item_xmlfunc.cc: Bug#16318: XML: extractvalue() incorrectly returns last() = 1 - adding "size" member into MY_XPATH_FLT struct, to pass parent's context size when iterating in a predicate. Previously, temporaty context size was calculated instead, which is always 1. As a result, things like last() and count() didn't work fine. - adding iteration into Item_func_xpath_elementbyindex: similar to Item_func_xpath_predicate. This is to make things like last() and count() work inside square brackets. mysql-test/t/xml.test: Adding test case. mysql-test/r/xml.result: Adding test case.
a5694ba4