[UPGRADE] Remove unused compatible code

This commit is contained in:
tino247
2022-11-21 07:29:40 +00:00
committed by wangzelin.wzl
parent cd2a883c13
commit 7d8c4a42fc
67 changed files with 509 additions and 1339 deletions

View File

@ -997,13 +997,7 @@ int ObSQLUtils::check_and_convert_db_name(const ObCollationType cs_type, const b
ObString origin_name = name;
int64_t name_len = name.length();
const char *name_str = name.ptr();
/**
* 在2.2.20版本上将命名长度比较逻辑由大于等于128字节时报错调整为大于128字节时报错后, 2.2.20以上版本
* 数据库名长度可以为128字节。 升级过程中高版本server序列化session info到低版本server时, 如果数据
* 库名长度为128字节会存在兼容性问题。 因此在升级过程中限制数据库名长度不超过127字节
*/
int32_t max_database_name_length = GET_MIN_CLUSTER_VERSION() < CLUSTER_CURRENT_VERSION ?
OB_MAX_DATABASE_NAME_LENGTH - 1 : OB_MAX_DATABASE_NAME_LENGTH;
int32_t max_database_name_length = OB_MAX_DATABASE_NAME_LENGTH;
if (0 == name_len || name_len > (max_database_name_length * OB_MAX_CHAR_LEN)) {
ret = OB_WRONG_DB_NAME;
LOG_USER_ERROR(OB_WRONG_DB_NAME, static_cast<int32_t>(name_len), name_str);