aboutsummaryrefslogtreecommitdiff
path: root/src/btree.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-11-06 20:22:25 +0000
committerdrh <drh@noemail.net>2015-11-06 20:22:25 +0000
commit3adf8783b0cee9e24d8965c242eb910661ba03ed (patch)
tree48fb26baf887c200c9d22f1abb9a63f220a9387d /src/btree.c
parentf83075201fabeb66ae1a1407ba285d1f7c145a96 (diff)
parentb1d607de25eae569ccdf6b56f5b648124bc4def3 (diff)
downloadsqlite-3adf8783b0cee9e24d8965c242eb910661ba03ed.tar.gz
sqlite-3adf8783b0cee9e24d8965c242eb910661ba03ed.zip
Avoid an unnecessary key comparison when doing an indexed lookup against an
equality constraint. FossilOrigin-Name: d741e1ccdce96e6142e294fbdd20a0282296dcea
Diffstat (limited to 'src/btree.c')
-rw-r--r--src/btree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/btree.c b/src/btree.c
index 5488d2010..a61a6edf2 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -5041,6 +5041,8 @@ int sqlite3BtreeLast(BtCursor *pCur, int *pRes){
** *pRes>0 The cursor is left pointing at an entry that
** is larger than intKey/pIdxKey.
**
+** For index tables, the pIdxKey->eqSeen field is set to 1 if there
+** exists an entry in the table that exactly matches pIdxKey.
*/
int sqlite3BtreeMovetoUnpacked(
BtCursor *pCur, /* The cursor to be moved */
@@ -9644,7 +9646,6 @@ int sqlite3BtreeSetVersion(Btree *pBtree, int iVersion){
return rc;
}
-#ifdef SQLITE_DEBUG
/*
** Return true if the cursor has a hint specified. This routine is
** only used from within assert() statements
@@ -9652,7 +9653,6 @@ int sqlite3BtreeSetVersion(Btree *pBtree, int iVersion){
int sqlite3BtreeCursorHasHint(BtCursor *pCsr, unsigned int mask){
return (pCsr->hints & mask)!=0;
}
-#endif
/*
** Return true if the given Btree is read-only.