set the initial value of wrs to scn min
This commit is contained in:
		| @ -90,8 +90,7 @@ int ObExprRelationAnalyzer::visit_expr(ObRawExpr &expr, int32_t stmt_level) | ||||
|       LOG_WARN("param expr is null", K(ret), K(param), K(i), K(expr)); | ||||
|     } else if (OB_FAIL(SMART_CALL(visit_expr(*param, stmt_level)))) { | ||||
|       LOG_WARN("failed to visit param", K(ret)); | ||||
|     } else if (!expr.is_query_ref_expr() && | ||||
|                OB_FAIL(expr.get_expr_levels().add_members(param->get_expr_levels()))) { | ||||
|     } else if (OB_FAIL(expr.get_expr_levels().add_members(param->get_expr_levels()))) { | ||||
|       LOG_WARN("failed to add expr levels", K(ret)); | ||||
|     } else if (!param->get_expr_levels().has_member(stmt_level)) { | ||||
|       // skip | ||||
| @ -161,6 +160,8 @@ int ObExprRelationAnalyzer::visit_stmt(ObDMLStmt *stmt) | ||||
|         LOG_WARN("relation expr is null", K(ret), K(expr)); | ||||
|       } else if (OB_FAIL(visit_expr(*expr, stmt->get_current_level()))) { | ||||
|         LOG_WARN("failed to visit expr", K(ret)); | ||||
|       } else if (OB_FAIL(expr->extract_info())) { | ||||
|         LOG_WARN("failed to extract expr info"); | ||||
|       } | ||||
|     } | ||||
|     if (OB_SUCC(ret) && stmt->is_select_stmt()) { | ||||
|  | ||||
| @ -2316,7 +2316,9 @@ int ObRawExprResolverImpl::process_datatype_or_questionmark(const ParseNode &nod | ||||
|           c_expr->set_expr_obj_meta(question_mark_meta); | ||||
|           if (NULL == ctx_.external_param_info_) { | ||||
|             /*do nothing...*/ | ||||
|           } else if (ctx_.is_for_dynamic_sql_ || ctx_.is_for_dbms_sql_) { | ||||
|           } else if (ctx_.is_for_dbms_sql_ | ||||
|                      || (ctx_.is_for_dynamic_sql_ && OB_NOT_NULL(session_info->get_pl_context()))){ | ||||
|             //NOTICE: only need to process PL dynamic sql and dbms sql | ||||
|             /*dynmaic and dbms sql already prepare question mark in parse stage.*/ | ||||
|             bool need_save = true; | ||||
|             for (int64_t i = 0; OB_SUCC(ret) && i < ctx_.external_param_info_->count(); ++i) { | ||||
| @ -2382,6 +2384,16 @@ int ObRawExprResolverImpl::process_datatype_or_questionmark(const ParseNode &nod | ||||
|             c_expr->set_accuracy(param.get_accuracy()); | ||||
|             c_expr->set_result_flag(param.get_result_flag()); // not_null etc | ||||
|             c_expr->set_param(param); | ||||
|  | ||||
|             sql::ObExprResType result_type = c_expr->get_result_type(); | ||||
|             if (result_type.get_length() == -1) { | ||||
|               if (result_type.is_varchar() || result_type.is_nvarchar2()) { | ||||
|                 result_type.set_length(OB_MAX_ORACLE_VARCHAR_LENGTH); | ||||
|               } else if (result_type.is_char() || result_type.is_nchar()) { | ||||
|                 result_type.set_length(OB_MAX_ORACLE_CHAR_LENGTH_BYTE); | ||||
|               } | ||||
|             } | ||||
|             c_expr->set_result_type(result_type); | ||||
|           } | ||||
| //execute阶段不需要统计prepare_param_count_的个数 | ||||
| //          ctx_.prepare_param_count_++; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 obdev
					obdev