mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 01:58:16 +00:00
Dont re-seek if we are inserting a new unique index
This commit is contained in:
parent
a2b9d8d371
commit
6b42808f1a
1 changed files with 9 additions and 7 deletions
|
@ -2161,13 +2161,15 @@ impl BTreeCursor {
|
|||
},
|
||||
None => {
|
||||
if !moved_before {
|
||||
return_if_io!(self.move_to(
|
||||
match key {
|
||||
BTreeKey::IndexKey(_) => SeekKey::IndexKey(key.get_record().unwrap()),
|
||||
BTreeKey::TableRowId(_) => SeekKey::TableRowId(key.to_rowid()),
|
||||
},
|
||||
SeekOp::EQ
|
||||
));
|
||||
match key {
|
||||
BTreeKey::IndexKey(_) => {
|
||||
return_if_io!(self
|
||||
.move_to(SeekKey::IndexKey(key.get_record().unwrap()), SeekOp::GE))
|
||||
}
|
||||
BTreeKey::TableRowId(_) => return_if_io!(
|
||||
self.move_to(SeekKey::TableRowId(key.to_rowid()), SeekOp::EQ)
|
||||
),
|
||||
}
|
||||
}
|
||||
return_if_io!(self.insert_into_page(key));
|
||||
if key.maybe_rowid().is_some() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue