bugfix : dynamic sql without quesmark type check && encoding session & xmltype compare in case
This commit is contained in:
		@ -131,10 +131,7 @@ int ObExprArgCase::calc_result_typeN(ObExprResType &type,
 | 
				
			|||||||
    int64_t val_type_count = param_num / 2;
 | 
					    int64_t val_type_count = param_num / 2;
 | 
				
			||||||
    ObExprResType tmp_res_type;
 | 
					    ObExprResType tmp_res_type;
 | 
				
			||||||
    const ObLengthSemantics default_length_semantics = (OB_NOT_NULL(type_ctx.get_session()) ? type_ctx.get_session()->get_actual_nls_length_semantics() : LS_BYTE);
 | 
					    const ObLengthSemantics default_length_semantics = (OB_NOT_NULL(type_ctx.get_session()) ? type_ctx.get_session()->get_actual_nls_length_semantics() : LS_BYTE);
 | 
				
			||||||
    if (lib::is_oracle_mode() && types_stack[0].is_xml_sql_type()) {
 | 
					    if (OB_FAIL(aggregate_result_type_for_case(
 | 
				
			||||||
      ret = OB_ERR_NO_ORDER_MAP_SQL;
 | 
					 | 
				
			||||||
      LOG_WARN("cannot ORDER objects without MAP or ORDER method", K(ret));
 | 
					 | 
				
			||||||
    } else if (OB_FAIL(aggregate_result_type_for_case(
 | 
					 | 
				
			||||||
                  tmp_res_type,
 | 
					                  tmp_res_type,
 | 
				
			||||||
                  types_stack,
 | 
					                  types_stack,
 | 
				
			||||||
                  cond_type_count,
 | 
					                  cond_type_count,
 | 
				
			||||||
@ -171,6 +168,9 @@ int ObExprArgCase::calc_result_typeN(ObExprResType &type,
 | 
				
			|||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            types_stack[i].set_calc_type(calc_type);
 | 
					            types_stack[i].set_calc_type(calc_type);
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					        } else if (lib::is_oracle_mode() && types_stack[0].is_xml_sql_type() && types_stack[i].is_xml_sql_type()) {
 | 
				
			||||||
 | 
					          ret = OB_ERR_NO_ORDER_MAP_SQL;
 | 
				
			||||||
 | 
					          LOG_WARN("cannot ORDER objects without MAP or ORDER method", K(ret));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -6393,7 +6393,8 @@ int ObRawExprUtils::check_composite_cast(ObRawExpr *&expr, ObSchemaChecker &sche
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    } else if (ObExtendType == obj_type
 | 
					    } else if (ObExtendType == obj_type
 | 
				
			||||||
               && OB_INVALID_ID != udt_id) {
 | 
					               && OB_INVALID_ID != udt_id
 | 
				
			||||||
 | 
					               && src->get_expr_type() != T_QUESTIONMARK) {
 | 
				
			||||||
      if (ObNullType == src->get_result_type().get_type()) {
 | 
					      if (ObNullType == src->get_result_type().get_type()) {
 | 
				
			||||||
        // do nothing
 | 
					        // do nothing
 | 
				
			||||||
      } else if (src->get_result_type().is_user_defined_sql_type()) {
 | 
					      } else if (src->get_result_type().is_user_defined_sql_type()) {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user