Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion core/rs/core/src/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ pub unsafe fn commit_or_rollback_reset(ext_data: *mut crsql_ExtData) {
let mut table_infos = unsafe {
mem::ManuallyDrop::new(Box::from_raw((*ext_data).tableInfos as *mut Vec<TableInfo>))
};
ordinals.clear();

let mut last_db_versions: mem::ManuallyDrop<Box<BTreeMap<Vec<u8>, i64>>> =
mem::ManuallyDrop::new(Box::from_raw(
(*ext_data).lastDbVersions as *mut BTreeMap<Vec<u8>, i64>,
));

last_db_versions.clear();
ordinals.clear();
for tbl_info in table_infos.iter_mut() {
tbl_info.clear_cl_cache();
}
Expand Down
2 changes: 1 addition & 1 deletion core/rs/core/src/db_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ pub fn insert_db_version(
insert_db_vrsn: i64,
) -> Result<(), ResultCode> {
unsafe {
// we can get a more recent db_versio
// we can get a more recent db_version
let mut last_db_versions: mem::ManuallyDrop<Box<BTreeMap<Vec<u8>, i64>>> =
mem::ManuallyDrop::new(Box::from_raw(
(*ext_data).lastDbVersions as *mut BTreeMap<Vec<u8>, i64>,
Expand Down
Loading