TiDB compatibility: Add support to utf8mb4_bin collation
@@ -9,6 +9,7 @@ use crate::types::Type;
const COLLATE_UTF8_GENERAL_CI: u16 = 33;
const COLLATE_UTF8_UNICODE_CI: u16 = 192;
const COLLATE_UTF8MB4_UNICODE_CI: u16 = 224;
+const COLLATE_UTF8MB4_BIN: u16 = 46
impl Type<MySql> for str {
fn type_info() -> MySqlTypeInfo {
@@ -34,7 +35,7 @@ impl Type<MySql> for str {
| ColumnType::Enum
) && matches!(
ty.char_set,
- COLLATE_UTF8MB4_UNICODE_CI | COLLATE_UTF8_UNICODE_CI | COLLATE_UTF8_GENERAL_CI
+ COLLATE_UTF8MB4_UNICODE_CI | COLLATE_UTF8_UNICODE_CI | COLLATE_UTF8_GENERAL_CI | COLLATE_UTF8MB4_BIN
)
}
}
