fix oracle not null and fix mysqltest

This commit is contained in:
yongshige
2023-03-14 08:10:53 +00:00
committed by ob-robot
parent 6d4641c7bc
commit bc8e51c3e8

View File

@ -329,7 +329,9 @@ int ObTableLoadObjCaster::cast_obj_check(ObTableLoadCastObjCtx &cast_obj_ctx,
const ObAccuracy &accuracy = column_schema->get_accuracy();
const ObObjType expect_type = column_schema->get_meta_type().get_type();
bool is_fast_number = cast_obj_ctx.number_fast_ctx_.is_fast_number_;
if (obj.is_null() && !column_schema->is_nullable()) {
bool not_null_validate = (!column_schema->is_nullable() && lib::is_mysql_mode()) ||
(column_schema->is_not_null_enable_column() && lib::is_oracle_mode());
if (obj.is_null() && not_null_validate) {
const ObString &column_name = column_schema->get_column_name();
ret = OB_BAD_NULL_ERROR;
LOG_USER_ERROR(OB_BAD_NULL_ERROR, column_name.length(), column_name.ptr());