MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / my_xpath_parse_RelativeLocationPath

Function my_xpath_parse_RelativeLocationPath

sql/item_xmlfunc.cc:1597–1614  ·  view source on GitHub ↗

Scan Relative Location Path SYNOPSYS For better performance we combine these two rules [3] RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | AbbreviatedRelativeLocationPath [11] AbbreviatedRelativeLocationPath ::= RelativeLocationPath '//' Step Into this one: [3-11] RelativeLocationPath

Source from the content-addressed store, hash-verified

1595 0 - failure
1596*/
1597static int my_xpath_parse_RelativeLocationPath(MY_XPATH *xpath)
1598{
1599 if (!my_xpath_parse_Step(xpath))
1600 return 0;
1601 while (my_xpath_parse_term(xpath, MY_XPATH_LEX_SLASH))
1602 {
1603 if (my_xpath_parse_term(xpath, MY_XPATH_LEX_SLASH))
1604 xpath->context= new Item_nodeset_func_descendantbyname(xpath->context,
1605 "*", 1,
1606 xpath->pxml, 1);
1607 if (!my_xpath_parse_Step(xpath))
1608 {
1609 xpath->error= 1;
1610 return 0;
1611 }
1612 }
1613 return 1;
1614}
1615
1616
1617/*

Calls 2

my_xpath_parse_StepFunction · 0.85
my_xpath_parse_termFunction · 0.85

Tested by

no test coverage detected