• bar@mysql.com's avatar
    Bug#16318: XML: extractvalue() incorrectly returns last() = 1 · f516d1f9
    bar@mysql.com 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.
    f516d1f9
item_xmlfunc.cc 66 KB