fix information schema case sensitive bug

This commit is contained in:
SevenJ-swj 2023-11-10 04:09:27 +00:00 committed by ob-robot
parent 751a0c5876
commit d373d22c17
2 changed files with 3 additions and 6 deletions

View File

@ -1780,11 +1780,7 @@ int ObSchemaGetterGuard::get_database_id(uint64_t tenant_id,
simple_database))) {
LOG_WARN("get simple database failed", KR(ret), K(tenant_id), K(database_name));
} else if (NULL == simple_database) {
if (0 == database_name.case_compare(OB_INFORMATION_SCHEMA_NAME)) {
database_id = OB_INFORMATION_SCHEMA_ID;
} else {
LOG_INFO("database not exist", K(tenant_id), K(database_name));
}
LOG_INFO("database not exist", K(tenant_id), K(database_name));
} else {
database_id = simple_database->get_database_id();
}

View File

@ -1049,7 +1049,8 @@ int ObSQLUtils::check_and_convert_db_name(const ObCollationType cs_type, const b
}
ObString last_name(name_len, name_str);
if (!preserve_lettercase) {
if (!preserve_lettercase
|| (lib::is_mysql_mode() && 0 == name.case_compare(OB_INFORMATION_SCHEMA_NAME))) {
ObCharset::casedn(CS_TYPE_UTF8MB4_BIN, last_name);
}
if (OB_ERR_WRONG_IDENT_NAME == (ret = check_ident_name(cs_type, last_name, check_for_path_chars,