Skip to content

Commit

Permalink
Merge pull request #135 from altmannmarcelo/collation
Browse files Browse the repository at this point in the history
Add proper support for collations
  • Loading branch information
blackbeam authored May 15, 2024
2 parents dea49cc + 227e384 commit 2d9e6bc
Show file tree
Hide file tree
Showing 4 changed files with 4,167 additions and 8 deletions.
12 changes: 9 additions & 3 deletions src/binlog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ mod tests {

use crate::{
binlog::{events::RowsEventData, value::BinlogValue},
collations::CollationId,
constants::ColumnFlags,
proto::MySerialize,
value::Value,
Expand Down Expand Up @@ -784,9 +785,14 @@ mod tests {
assert_eq!(col.flags(), f);
}

for (col, charset) in columns.iter().zip([0, 45, 45, 63, 0])
{
assert_eq!(col.character_set(), charset);
for (col, charset) in columns.iter().zip([
CollationId::UNKNOWN_COLLATION_ID,
CollationId::UTF8MB4_GENERAL_CI,
CollationId::UTF8MB4_GENERAL_CI,
CollationId::BINARY,
CollationId::UNKNOWN_COLLATION_ID,
]) {
assert_eq!(col.character_set(), charset as u16);
}
}
}
Expand Down
Loading

0 comments on commit 2d9e6bc

Please sign in to comment.