From 976ace7e8d4314a00a01dada5afb8573c10dc9ce Mon Sep 17 00:00:00 2001 From: qingzhu521 Date: Thu, 12 Dec 2024 14:44:50 +0000 Subject: [PATCH] fix collation update problem --- src/share/system_variable/ob_system_variable.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/share/system_variable/ob_system_variable.cpp b/src/share/system_variable/ob_system_variable.cpp index ec50559846..200107dca6 100644 --- a/src/share/system_variable/ob_system_variable.cpp +++ b/src/share/system_variable/ob_system_variable.cpp @@ -2010,6 +2010,12 @@ int ObSysVarOnCheckFuncs::check_and_convert_collation_not_null(ObExecContext &ct if (CS_TYPE_INVALID == (coll_type = ObCharset::collation_type(coll_name))) { ret = OB_ERR_UNKNOWN_COLLATION; LOG_USER_ERROR(OB_ERR_UNKNOWN_COLLATION, coll_name.length(), coll_name.ptr()); + } else if (OB_FAIL(sql::ObSQLUtils::is_charset_data_version_valid(common::ObCharset::charset_type_by_coll(static_cast(coll_type)), + session->get_effective_tenant_id()))) { + LOG_WARN("failed to check charset data version valid", K(ret)); + } else if (OB_FAIL(sql::ObSQLUtils::is_collation_data_version_valid(static_cast(coll_type), + session->get_effective_tenant_id()))) { + LOG_WARN("failed to check collation data version valid", K(ret)); } else { out_val.set_int(static_cast(coll_type)); }