diff --git a/src/sql/engine/expr/ob_expr_repeat.cpp b/src/sql/engine/expr/ob_expr_repeat.cpp index 1fda797e82..6e11c31706 100644 --- a/src/sql/engine/expr/ob_expr_repeat.cpp +++ b/src/sql/engine/expr/ob_expr_repeat.cpp @@ -210,6 +210,9 @@ int ObExprRepeat::repeat_text(ObObjType res_type, int64_t tot_length = length * count; int64_t buffer_len = 0; char *buf = NULL; + if (tot_length >= MEM_WARN_THRESHOLD) { + LOG_INFO("once repeat cost over 100M", K(ret), K(tot_length), K(length), K(count)); + } ObTextStringResult result_buffer(res_type, has_lob_header, &allocator); if (OB_FAIL(result_buffer.init(tot_length))) { LOG_WARN("init result failed", K(ret), K(tot_length)); diff --git a/src/sql/engine/expr/ob_expr_repeat.h b/src/sql/engine/expr/ob_expr_repeat.h index 57901bf5e7..51c2de9794 100644 --- a/src/sql/engine/expr/ob_expr_repeat.h +++ b/src/sql/engine/expr/ob_expr_repeat.h @@ -62,6 +62,7 @@ public: ObIAllocator &allocator, const int64_t max_result_size); private: + static const int64_t MEM_WARN_THRESHOLD = 100 * 1024 * 1024; // 100M // disallow copy DISALLOW_COPY_AND_ASSIGN(ObExprRepeat); };