Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 8d900c1

Browse files
authored
fix optional replicatio index in hrana (#687)
1 parent 7b20fb1 commit 8d900c1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sqld/src/hrana/proto.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ pub struct StmtResult {
5050
#[serde(with = "option_i64_as_str")]
5151
#[prost(sint64, optional, tag = "4")]
5252
pub last_insert_rowid: Option<i64>,
53-
#[prost(uint64, tag = "5")]
54-
pub replication_index: u64,
53+
#[prost(uint64, optional, tag = "5")]
54+
pub replication_index: Option<u64>,
5555
}
5656

5757
#[derive(Serialize, prost::Message)]

sqld/src/hrana/result_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl QueryResultBuilder for SingleStatementBuilder {
238238
rows: std::mem::take(&mut self.rows),
239239
affected_row_count: std::mem::take(&mut self.affected_row_count),
240240
last_insert_rowid: std::mem::take(&mut self.last_insert_rowid),
241-
replication_index: self.last_frame_no.unwrap(),
241+
replication_index: self.last_frame_no,
242242
}),
243243
}
244244
}

0 commit comments

Comments
 (0)