fix on 4.3: online ddl does not change storage schema, result to 4105.
This commit is contained in:
parent
31e5ff5f59
commit
a66645c8be
18
deps/oblib/src/common/object/ob_obj_type.cpp
vendored
18
deps/oblib/src/common/object/ob_obj_type.cpp
vendored
@ -650,24 +650,6 @@ bool is_match_alter_integer_column_online_ddl_rules(const common::ObObjMeta& src
|
||||
|| (src_meta.is_unsigned_integer() && dst_meta.is_unsigned_integer())) // both are singed or unsigned integer
|
||||
&& src_meta.get_type() <= dst_meta.get_type())) { // (unsigned) integer can be changed into larger by online ddl
|
||||
is_online_ddl = true;
|
||||
} else if (src_meta.is_unsigned_integer() && dst_meta.is_signed_integer()) {
|
||||
if (src_meta.is_utinyint()) {
|
||||
if (dst_meta.get_type() >= ObSmallIntType && dst_meta.get_type() <= ObIntType) { // unsigned tinyint -> smallint mediumint int bigint
|
||||
is_online_ddl = true;
|
||||
}
|
||||
} else if (src_meta.is_usmallint()) {
|
||||
if (dst_meta.get_type() >= ObMediumIntType && dst_meta.get_type() <= ObIntType) { // unsigned smallint -> mediumint int bigint
|
||||
is_online_ddl = true;
|
||||
}
|
||||
} else if (src_meta.is_umediumint()) {
|
||||
if (dst_meta.get_type() >= ObInt32Type && dst_meta.get_type() <= ObIntType) { // unsigned mediumint -> int bigint
|
||||
is_online_ddl = true;
|
||||
}
|
||||
} else if (src_meta.is_uint32()) {
|
||||
if (dst_meta.is_int()) { // unsigned int -> bigint
|
||||
is_online_ddl = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return is_online_ddl;
|
||||
}
|
||||
|
@ -4486,6 +4486,10 @@ int ObTableSchema::check_alter_column_type(const ObColumnSchemaV2 &src_column,
|
||||
is_offline = true;
|
||||
}
|
||||
}
|
||||
if ((src_meta.is_signed_integer() && dst_meta.is_unsigned_integer())
|
||||
|| (src_meta.is_unsigned_integer() && dst_meta.is_signed_integer())) {
|
||||
is_offline = true;
|
||||
}
|
||||
if (!src_meta.is_lob_storage() && dst_meta.is_lob_storage()) {
|
||||
is_offline = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user