易用性: update set
This commit is contained in:
parent
9175be1680
commit
f327de3913
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user