fix used incorrect cached temp expr ctx bug
This commit is contained in:
		| @ -59,6 +59,7 @@ int ObExecutor::execute_plan(ObExecContext &ctx) | ||||
|   ObSQLSessionInfo *session_info = ctx.get_my_session(); | ||||
|   ObPhysicalPlanCtx *plan_ctx = ctx.get_physical_plan_ctx(); | ||||
|   int64_t batched_stmt_cnt = ctx.get_sql_ctx()->multi_stmt_item_.get_batched_stmt_cnt(); | ||||
|   ctx.set_use_temp_expr_ctx_cache(true); | ||||
|   // If the batch execution is rewritten by insert multi values, there is no need to repack multiple times | ||||
|   if (ctx.get_sql_ctx()->multi_stmt_item_.is_ins_multi_val_opt()) { | ||||
|     batched_stmt_cnt = 0; | ||||
|  | ||||
| @ -426,6 +426,7 @@ int ObRemoteBaseExecuteP<T>::execute_remote_plan(ObExecContext &exec_ctx, | ||||
|   ObSQLSessionInfo *session = exec_ctx.get_my_session(); | ||||
|   ObPhysicalPlanCtx *plan_ctx = exec_ctx.get_physical_plan_ctx(); | ||||
|   ObOperator *se_op = nullptr; // static engine operator | ||||
|   exec_ctx.set_use_temp_expr_ctx_cache(true); | ||||
|   if (OB_ISNULL(plan_ctx) || OB_ISNULL(session)) { | ||||
|     ret = OB_ERR_UNEXPECTED; | ||||
|     LOG_ERROR("op is NULL", K(ret), K(plan_ctx), K(session)); | ||||
| @ -633,6 +634,7 @@ int ObRemoteBaseExecuteP<T>::execute_with_sql(ObRemoteTask &task) | ||||
|   bool enable_sql_audit = GCONF.enable_sql_audit; | ||||
|   ObPhysicalPlan *plan = nullptr; | ||||
|   ObPhysicalPlanCtx *plan_ctx = nullptr; | ||||
|   exec_ctx_.set_use_temp_expr_ctx_cache(false); | ||||
|   int inject_err_no = EVENT_CALL(EventTable::EN_REMOTE_EXEC_ERR); | ||||
|   if (0 != inject_err_no) { | ||||
|     ret = inject_err_no; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 obdev
					obdev