• unknown's avatar
    Bug#20854 XML functions: wrong result in ExtractValue · 32ede45d
    unknown authored
    
    mysql-test/r/xml.result:
      - Adding test case
      - Fixing error message
    mysql-test/t/xml.test:
      Adding test case
    sql/item_xmlfunc.cc:
      For grammar rules with loops like:
      
        AdditiveExpr ::= MultiplicativeExpr ('+' MultiplicativeExpr)*
      
      If we scanned scanned '+' and then met an error when parsing
      MultiplicativeExpr, then we should fully stop parsing - without
      trying to apply any other rules.
      
      Fix: add "error" member into MY_XPATH structure,
      and make my_xpath_parse_term() never return success
      as soon as error set.
    strings/xml.c:
      Adding my_xml_ctype map for flags, indicating
      whether a character is a space character, is a
      valid identifier start character, is a valid
      identifier body character. Using this map to
      properly scan identifiers. Also, using this map
      to scan spaces faster (instead of strchr).
    32ede45d
xml.test 14.6 KB