Skip to content

Commit 6f7359d

Browse files
Merge pull request #350 from apecloud/fix/fix_cross_build
1, update mysql-binlog-connector-rust version to 0.3.1 since 0.3.0 has critical bug. 2, fix panic when user manually deleted records in data_marker table.
2 parents b59093e + d75b5e7 commit 6f7359d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ assigning_clones = "allow"
1818
[workspace.dependencies]
1919
sqlx = {git = "https://github.com/qianyiwen2019/sqlx", features = ["runtime-async-std-rustls", "mysql", "postgres", "bigdecimal", "ipnetwork", "mac_address", "bit-vec", "time", "chrono", "json", "uuid"]}
2020
futures = "0.3.25"
21-
mysql-binlog-connector-rust = "0.3.0"
21+
mysql-binlog-connector-rust = "0.3.1"
2222
serde = {version = "1", features = ["derive"]}
2323
serde_json = "1.0.87"
2424
chrono = "0.4.38"

dt-connector/src/data_marker.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,12 @@ impl DataMarker {
100100
DtData::Dml { row_data } => {
101101
// refresh should be only called when dt_data is a data marker
102102
// update data_origin_node
103-
if let Some(col_value) = row_data.after.as_ref().unwrap().get(DATA_ORIGIN_NODE) {
104-
// mysql, ColValue::Blob
105-
// pg, ColValue::String
106-
self.data_origin_node = col_value.to_string();
103+
if let Some(after) = &row_data.after {
104+
if let Some(col_value) = after.get(DATA_ORIGIN_NODE) {
105+
// mysql, ColValue::Blob
106+
// pg, ColValue::String
107+
self.data_origin_node = col_value.to_string();
108+
}
107109
}
108110
}
109111

0 commit comments

Comments
 (0)