fix the bug of not check collation valid when set session variable
This commit is contained in:
@ -669,16 +669,33 @@ int ObSQLUtils::is_collation_data_version_valid(ObCollationType collation_type,
|
||||
ret = OB_NOT_SUPPORTED;
|
||||
SQL_LOG(WARN, "Unicode collation not supported when data_version < 4_2_4_0 or between [430,433)", K(collation_type), K(ret));
|
||||
LOG_USER_ERROR(OB_NOT_SUPPORTED, "Unicode collation not supported when data_version < 4_2_4_0 or between [430,433), unicode collation is");
|
||||
} else if ((data_version < MOCK_DATA_VERSION_4_2_5_0
|
||||
|| (data_version >= DATA_VERSION_4_3_0_0 && data_version < DATA_VERSION_4_3_4_0))
|
||||
&& (CS_TYPE_UTF8MB4_ZH_0900_AS_CS != collation_type &&
|
||||
} else if ((
|
||||
data_version < MOCK_DATA_VERSION_4_2_5_0 ||
|
||||
(data_version >= DATA_VERSION_4_3_0_0 && data_version < DATA_VERSION_4_3_4_0)
|
||||
)
|
||||
&&
|
||||
(
|
||||
CS_TYPE_UTF8MB4_ZH_0900_AS_CS != collation_type &&
|
||||
CS_TYPE_UTF8MB4_CROATIAN_UCA_CI != collation_type &&
|
||||
CS_TYPE_UTF8MB4_UNICODE_520_CI != collation_type &&
|
||||
CS_TYPE_UTF8MB4_CZECH_UCA_CI != collation_type &&
|
||||
CS_TYPE_UTF8MB4_0900_AI_CI != collation_type &&
|
||||
((CS_TYPE_UTF8MB4_0900_AI_CI <= collation_type && collation_type <= CS_TYPE_UTF8MB4_MN_CYRL_0900_AS_CS)
|
||||
|| (CS_TYPE_UTF16_ICELANDIC_UCA_CI <= collation_type && collation_type <= CS_TYPE_UTF16_VIETNAMESE_CI)
|
||||
|| (CS_TYPE_UTF8MB4_ICELANDIC_UCA_CI <= collation_type && collation_type <= CS_TYPE_UTF8MB4_VIETNAMESE_CI)))) {
|
||||
((CS_TYPE_UTF8MB4_0900_AI_CI <= collation_type && collation_type <= CS_TYPE_UTF8MB4_MN_CYRL_0900_AS_CS)
|
||||
|| (CS_TYPE_UTF16_ICELANDIC_UCA_CI <= collation_type && collation_type <= CS_TYPE_UTF16_VIETNAMESE_CI)
|
||||
|| (CS_TYPE_UTF8MB4_ICELANDIC_UCA_CI <= collation_type && collation_type <= CS_TYPE_UTF8MB4_VIETNAMESE_CI)
|
||||
|| CS_TYPE_BIG5_BIN == collation_type
|
||||
|| CS_TYPE_BIG5_CHINESE_CI == collation_type
|
||||
|| CS_TYPE_LATIN1_GERMAN2_CI == collation_type
|
||||
|| CS_TYPE_LATIN1_GERMAN1_CI == collation_type
|
||||
|| CS_TYPE_LATIN1_SWEDISH_CI == collation_type
|
||||
|| CS_TYPE_LATIN1_DANISH_CI == collation_type
|
||||
|| CS_TYPE_LATIN1_SPANISH_CI == collation_type
|
||||
|| CS_TYPE_HKSCS31_BIN == collation_type
|
||||
|| CS_TYPE_HKSCS_BIN == collation_type
|
||||
|| CS_TYPE_DEC8_BIN == collation_type
|
||||
|| CS_TYPE_DEC8_SWEDISH_CI == collation_type
|
||||
)
|
||||
)) {
|
||||
ret = OB_NOT_SUPPORTED;
|
||||
SQL_LOG(WARN, "Unicode collation not supported when data_version < 4_2_5_0 or between [430,434)", K(collation_type), K(ret));
|
||||
LOG_USER_ERROR(OB_NOT_SUPPORTED, "Unicode collation not supported when data_version < 4_2_5_0 or between [430,434), unicode collation is");
|
||||
|
||||
Reference in New Issue
Block a user