提交 f327de39 编写于 作者: O obdev 提交者: wangzelin.wzl

易用性: update set

上级 9175be16
......@@ -2700,7 +2700,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_ERR_FLASHBACK_QUERY_WITH_UPDATE__USER_ERROR_MSG "snapshot expression not allowed here"
#define OB_ERR_UPDATE_ON_EXPR__USER_ERROR_MSG "Columns referenced in the ON Clause cannot be updated:'%.*s'.'%.*s'"
#define OB_ERR_SPECIFIED_ROW_NO_LONGER_EXISTS__USER_ERROR_MSG "specified row no longer exists"
#define OB_ERR_DATA_TOO_LONG_MSG_FMT_V2__USER_ERROR_MSG "Data too long for column '%.*s' at row %ld"
#define OB_ERR_DATA_TOO_LONG_MSG_FMT_V2__USER_ERROR_MSG "value too large for column %.*s (actual: %ld, maximum: %ld)"
#define OB_ERR_INVALID_DATE_MSG_FMT_V2__USER_ERROR_MSG "Incorrect datetime value for column '%.*s' at row %ld"
......
......@@ -352,15 +352,14 @@ int ObExprColumnConv::column_convert(const ObExpr& expr, ObEvalCtx& ctx, ObDatum
const int64_t str_len_byte = static_cast<int64_t>(val->len_);
if (OB_FAIL(datum_accuracy_check(expr, cast_mode, ctx, *val, datum, warning))) {
LOG_WARN("fail to check accuracy", K(ret), K(datum), K(expr), K(warning));
// compatible with old code
if (OB_ERR_DATA_TOO_LONG == ret && lib::is_oracle_mode() && PARAMS_COUNT_WITH_COLUMN_INFO == expr.arg_cnt_) {
if (OB_ERR_DATA_TOO_LONG == ret && PARAMS_COUNT_WITH_COLUMN_INFO == expr.arg_cnt_) {
ObString column_info_str;
ObDatum* column_info = NULL;
if (OB_FAIL(expr.args_[5]->eval(ctx, column_info))) {
LOG_WARN("evaluate parameter failed", K(ret));
} else {
column_info_str = column_info->get_string();
LOG_ORACLE_USER_ERROR(OB_ERR_DATA_TOO_LONG_MSG_FMT_V2,
LOG_USER_ERROR(OB_ERR_DATA_TOO_LONG_MSG_FMT_V2,
column_info_str.length(),
column_info_str.ptr(),
str_len_byte,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册