diff --git a/src/sql/engine/expr/ob_expr_to_outfile_row.cpp b/src/sql/engine/expr/ob_expr_to_outfile_row.cpp index 0bdd338b58..9b0fd22162 100644 --- a/src/sql/engine/expr/ob_expr_to_outfile_row.cpp +++ b/src/sql/engine/expr/ob_expr_to_outfile_row.cpp @@ -193,9 +193,9 @@ int ObExprToOutfileRow::to_outfile_str(const ObExpr &expr, ObEvalCtx &ctx, ObDat ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("allocate memory failed", K(ret), K(pos)); } else { - MEMCPY(res_buf, buf, pos); - expr_datum.set_string(res_buf, pos); - } + MEMCPY(res_buf, buf, pos); + expr_datum.set_string(res_buf, pos); + } } } while (OB_SIZE_OVERFLOW == ret && OB_SUCC(extend_buffer(*out_info, ctx.exec_ctx_.get_allocator()))); diff --git a/src/sql/executor/ob_remote_executor_processor.cpp b/src/sql/executor/ob_remote_executor_processor.cpp index f72a18a88f..d79e58a570 100644 --- a/src/sql/executor/ob_remote_executor_processor.cpp +++ b/src/sql/executor/ob_remote_executor_processor.cpp @@ -183,6 +183,10 @@ int ObRemoteBaseExecuteP::base_before_process(int64_t tenant_schema_version, if (is_schema_error(ret)) { ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH; // 重写错误码,使得scheduler端能等待远端schema刷新并重试 } + } else if (-1 == tenant_schema_version && ret == OB_TENANT_NOT_EXIST) { + // fix bug: https://work.aone.alibaba-inc.com/issue/45890226 + // 控制端重启observer,导致租户schema没刷出来,发送过来的schema_version异常, 让对端重试 + ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH; } else { if (OB_SCHEMA_ERROR == ret || OB_SCHEMA_EAGAIN == ret) { ret = OB_ERR_WAIT_REMOTE_SCHEMA_REFRESH; // 针对OB_SCHEMA_ERROR 和OB_SCHEMA_EAGAIN这两个错误码,远程执行暂时先考虑重写,等待远端schema刷新并重试