[CP] fix row expr query range death loop bug
This commit is contained in:
		@ -4298,32 +4298,32 @@ int ObQueryRange::do_row_gt_and(ObKeyPart *l_gt, ObKeyPart *r_gt, ObKeyPart  *&r
 | 
			
		||||
      for (r_cur = r_gt; OB_SUCC(ret) && !always_true && NULL != r_cur; r_cur = r_cur->or_next_) {
 | 
			
		||||
        ObKeyPart *result = NULL;
 | 
			
		||||
        ObKeyPart *rest = NULL;
 | 
			
		||||
        if (l_cur->is_like_key() && r_cur->is_like_key()) {
 | 
			
		||||
          ret = OB_ERR_UNEXPECTED;
 | 
			
		||||
          LOG_WARN("l_cur and r_cur are both like key", K(ret), K(*l_cur), K(*r_cur));
 | 
			
		||||
        } else if (l_cur->is_like_key()) {
 | 
			
		||||
          result = r_cur;
 | 
			
		||||
        } else if (r_cur->is_like_key()) {
 | 
			
		||||
          result = l_cur;
 | 
			
		||||
        } else if (l_cur->is_in_key()) {
 | 
			
		||||
          result = l_cur;
 | 
			
		||||
        } else if (r_cur->is_in_key()) {
 | 
			
		||||
          result = r_cur;
 | 
			
		||||
        } else if (!l_cur->is_normal_key() || !r_cur->is_normal_key()
 | 
			
		||||
                   || l_cur->is_always_true() || l_cur->is_always_false()
 | 
			
		||||
                   || r_cur->is_always_true() || r_cur->is_always_false()) {
 | 
			
		||||
          ret = OB_ERR_UNEXPECTED;
 | 
			
		||||
          LOG_WARN("l_cur and r_cur are not always true or false.", K(*l_cur), K(*r_cur));
 | 
			
		||||
        } else {
 | 
			
		||||
        ObKeyPart *new_l_cur = NULL;
 | 
			
		||||
        ObKeyPart *new_r_cur = NULL;
 | 
			
		||||
        if (OB_FAIL(deep_copy_key_part_and_items(l_cur, new_l_cur))) {
 | 
			
		||||
          LOG_WARN("Light copy key part and items failed", K(ret));
 | 
			
		||||
        } else if(OB_FAIL(deep_copy_key_part_and_items(r_cur, new_r_cur))) {
 | 
			
		||||
          LOG_WARN("Right copy key part and items failed", K(ret));
 | 
			
		||||
        } else if (OB_ISNULL(new_l_cur) || OB_ISNULL(new_r_cur) ||
 | 
			
		||||
                  (OB_UNLIKELY(new_l_cur->is_like_key() && new_r_cur->is_like_key()))) {
 | 
			
		||||
          ret = OB_ERR_UNEXPECTED;
 | 
			
		||||
          LOG_WARN("new_l_cur and r_cur are both like key", K(ret), K(*new_l_cur), K(*new_r_cur));
 | 
			
		||||
        } else if (new_l_cur->is_like_key()) {
 | 
			
		||||
          result = new_r_cur;
 | 
			
		||||
        } else if (new_r_cur->is_like_key()) {
 | 
			
		||||
          result = new_l_cur;
 | 
			
		||||
        } else if (new_l_cur->is_in_key()) {
 | 
			
		||||
          result = new_l_cur;
 | 
			
		||||
        } else if (new_r_cur->is_in_key()) {
 | 
			
		||||
          result = new_r_cur;
 | 
			
		||||
        } else if (OB_UNLIKELY(!new_l_cur->is_normal_key() || !new_r_cur->is_normal_key()
 | 
			
		||||
                   || new_l_cur->is_always_true() || new_l_cur->is_always_false()
 | 
			
		||||
                   || new_r_cur->is_always_true() || new_r_cur->is_always_false())) {
 | 
			
		||||
          ret = OB_ERR_UNEXPECTED;
 | 
			
		||||
          LOG_WARN("new_l_cur and r_cur are not always true or false.", K(*new_l_cur), K(*new_r_cur));
 | 
			
		||||
        } else if (OB_FAIL(do_key_part_node_and(new_l_cur, new_r_cur, result))) {  // do AND of each key part node only
 | 
			
		||||
          LOG_WARN("Do key part node intersection failed", K(ret));
 | 
			
		||||
          } else if(NULL == result) {
 | 
			
		||||
        } else if(OB_ISNULL(result)) {
 | 
			
		||||
          ret = OB_ERR_UNEXPECTED;
 | 
			
		||||
          LOG_WARN("result is null.", K(ret));
 | 
			
		||||
        } else if (result->is_always_true()) {
 | 
			
		||||
@ -4356,7 +4356,6 @@ int ObQueryRange::do_row_gt_and(ObKeyPart *l_gt, ObKeyPart *r_gt, ObKeyPart  *&r
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (OB_SUCC(ret)) {
 | 
			
		||||
          result->link_gt(rest);
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user