mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Avoid a test for CURTYPE_BTREE in sqlite3VdbeCursorMoveto() in order to reduce
the size and improve the performance of OP_Column. FossilOrigin-Name: f078deb25149b7b1881b7f3374b343d0677e82336d8fdd7f1cdd06d926b5dd57
This commit is contained in:
11
src/btree.c
11
src/btree.c
@@ -838,6 +838,17 @@ int sqlite3BtreeCursorHasMoved(BtCursor *pCur){
|
||||
return pCur->eState!=CURSOR_VALID;
|
||||
}
|
||||
|
||||
/*
|
||||
** Return a pointer to a fake BtCursor object that will always answer
|
||||
** false to the sqlite3BtreeCursorHasMoved() routine above. The fake
|
||||
** cursor returned must not be used with any other Btree interface.
|
||||
*/
|
||||
BtCursor *sqlite3BtreeFakeValidCursor(void){
|
||||
static u8 fakeCursor = CURSOR_VALID;
|
||||
assert( offsetof(BtCursor, eState)==0 );
|
||||
return (BtCursor*)&fakeCursor;
|
||||
}
|
||||
|
||||
/*
|
||||
** This routine restores a cursor back to its original position after it
|
||||
** has been moved by some outside activity (such as a btree rebalance or
|
||||
|
Reference in New Issue
Block a user