fix using mysql mode to check oracle mode table name

This commit is contained in:
hamstersox
2023-09-13 04:40:08 +00:00
committed by ob-robot
parent 105d1b66c2
commit f773f1ea34
5 changed files with 25 additions and 8 deletions

View File

@ -1084,6 +1084,16 @@ int ObSQLUtils::check_and_convert_table_name(const ObCollationType cs_type,
ObString &name,
const stmt::StmtType stmt_type,
const bool is_index_table)
{
return check_and_convert_table_name(cs_type, preserve_lettercase, name, lib::is_oracle_mode(), stmt_type, is_index_table);
}
int ObSQLUtils::check_and_convert_table_name(const ObCollationType cs_type,
const bool preserve_lettercase,
ObString &name,
const bool is_oracle_mode,
const stmt::StmtType stmt_type,
const bool is_index_table)
{
/**
* MYSQL模式
@ -1101,7 +1111,7 @@ int ObSQLUtils::check_and_convert_table_name(const ObCollationType cs_type,
int ret = OB_SUCCESS;
int64_t name_len = name.length();
const char *name_str = name.ptr();
const int64_t max_user_table_name_length = lib::is_oracle_mode()
const int64_t max_user_table_name_length = is_oracle_mode
? OB_MAX_USER_TABLE_NAME_LENGTH_ORACLE : OB_MAX_USER_TABLE_NAME_LENGTH_MYSQL;
const int64_t max_index_name_prefix_len = 30;
if (0 == name_len