From 5c4d416a5627c97531bc0e88e0e758d15b97009d Mon Sep 17 00:00:00 2001 From: shadowao Date: Wed, 3 Jan 2024 15:52:34 +0000 Subject: [PATCH] [CP] adjust ob_default_lob_inrow_threshold invalid error msg --- src/share/system_variable/ob_system_variable.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/share/system_variable/ob_system_variable.cpp b/src/share/system_variable/ob_system_variable.cpp index 080bcc795b..d5a5a3a42c 100644 --- a/src/share/system_variable/ob_system_variable.cpp +++ b/src/share/system_variable/ob_system_variable.cpp @@ -2103,7 +2103,17 @@ int ObSysVarOnCheckFuncs::check_default_lob_inrow_threshold(sql::ObExecContext & } else if (inrow_threshold < OB_MIN_LOB_INROW_THRESHOLD || inrow_threshold > OB_MAX_LOB_INROW_THRESHOLD) { ret = OB_INVALID_ARGUMENT; LOG_WARN("lob inrow_threshold invalid", KR(ret), K(inrow_threshold)); - LOG_USER_ERROR(OB_INVALID_ARGUMENT, "invalid inrow_threshold LOB storage option value"); + // error msg to user + int tmp_ret = OB_SUCCESS; + const int64_t ERROR_MSG_LENGTH = 256; + char error_msg[ERROR_MSG_LENGTH] = ""; + int64_t pos = 0; + if (OB_SUCCESS != (tmp_ret = databuff_printf(error_msg, ERROR_MSG_LENGTH, + pos, "lob inrow threshold, should be [%ld, %ld]", OB_MIN_LOB_INROW_THRESHOLD, OB_MAX_LOB_INROW_THRESHOLD))) { + LOG_WARN("print error msg fail", K(ret), K(tmp_ret), K(error_msg), K(pos)); + } else { + LOG_USER_ERROR(OB_INVALID_ARGUMENT, error_msg); + } } else { out_val = in_val; }