diff --git a/core/mvcc/mvcc-rs/src/cursor.rs b/core/mvcc/mvcc-rs/src/cursor.rs index 230ad6ff6..003242293 100644 --- a/core/mvcc/mvcc-rs/src/cursor.rs +++ b/core/mvcc/mvcc-rs/src/cursor.rs @@ -37,6 +37,9 @@ impl< } pub async fn current(&self) -> Result> { + if self.index >= self.row_ids.len() { + return Ok(None); + } let id = self.row_ids[self.index]; self.db.read(self.tx_id, id).await }