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

Function my_xpath_parse_AndExpr

sql/item_xmlfunc.cc:2068–2086  ·  view source on GitHub ↗

Scan And Expression SYNOPSYS [22] AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr RETURN 1 - success 0 - failure */

Source from the content-addressed store, hash-verified

2066 0 - failure
2067*/
2068static int my_xpath_parse_AndExpr(MY_XPATH *xpath)
2069{
2070 if (!my_xpath_parse_EqualityExpr(xpath))
2071 return 0;
2072
2073 while (my_xpath_parse_term(xpath, MY_XPATH_LEX_AND))
2074 {
2075 Item *prev= xpath->item;
2076 if (!my_xpath_parse_EqualityExpr(xpath))
2077 {
2078 xpath->error= 1;
2079 return 0;
2080 }
2081
2082 xpath->item= new Item_cond_and(nodeset2bool(xpath,prev),
2083 nodeset2bool(xpath,xpath->item));
2084 }
2085 return 1;
2086}
2087
2088
2089/*

Callers 1

my_xpath_parse_OrExprFunction · 0.85

Calls 3

my_xpath_parse_termFunction · 0.85
nodeset2boolFunction · 0.85

Tested by

no test coverage detected