@@ -392,7 +392,7 @@ class Item_bool :public Item_int
392392public:
393393 Item_bool (int32 i): Item_int(i) {}
394394 const char *func_name () const { return " xpath_bool" ; }
395- bool is_bool_func () { return 1 ; }
395+ bool is_bool_type () { return true ; }
396396};
397397
398398
@@ -402,15 +402,14 @@ class Item_bool :public Item_int
402402 * a node-set is true if and only if it is non-empty
403403 * a string is true if and only if its length is non-zero
404404*/
405- class Item_xpath_cast_bool :public Item_int_func
405+ class Item_xpath_cast_bool :public Item_bool_func
406406{
407407 String *pxml;
408408 String tmp_value;
409409public:
410410 Item_xpath_cast_bool (Item *a, String *pxml_arg)
411- :Item_int_func (a), pxml(pxml_arg) {}
411+ :Item_bool_func (a), pxml(pxml_arg) {}
412412 const char *func_name () const { return " xpath_cast_bool" ; }
413- bool is_bool_func () { return 1 ; }
414413 longlong val_int ()
415414 {
416415 if (args[0 ]->type () == XPATH_NODESET)
@@ -568,7 +567,6 @@ class Item_nodeset_to_const_comparator :public Item_bool_func
568567 :Item_bool_func(nodeset,cmpfunc), pxml(p) {}
569568 enum Type type () const { return XPATH_NODESET_CMP; };
570569 const char *func_name () const { return " xpath_nodeset_to_const_comparator" ; }
571- bool is_bool_func () { return 1 ; }
572570 bool check_vcol_func_processor (uchar *int_arg)
573571 {
574572 return trace_unsupported_by_check_vcol_func_processor (func_name ());
@@ -823,7 +821,7 @@ String *Item_nodeset_func_elementbyindex::val_nodeset(String *nodeset)
823821 flt->pos ,
824822 size);
825823 int index= (int ) (args[1 ]->val_int ()) - 1 ;
826- if (index >= 0 && (flt->pos == (uint) index || args[1 ]->is_bool_func ()))
824+ if (index >= 0 && (flt->pos == (uint) index || args[1 ]->is_bool_type ()))
827825 ((XPathFilter*)nodeset)->append_element (flt->num , pos++);
828826 }
829827 return nodeset;
@@ -1732,7 +1730,7 @@ my_xpath_parse_AxisSpecifier_NodeTest_opt_Predicate_list(MY_XPATH *xpath)
17321730
17331731 xpath->item = nodeset2bool (xpath, xpath->item );
17341732
1735- if (xpath->item ->is_bool_func ())
1733+ if (xpath->item ->is_bool_type ())
17361734 {
17371735 xpath->context = new Item_nodeset_func_predicate (prev_context,
17381736 xpath->item ,
0 commit comments