diff options
author | drh <drh@noemail.net> | 2015-11-06 20:22:25 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-11-06 20:22:25 +0000 |
commit | 3adf8783b0cee9e24d8965c242eb910661ba03ed (patch) | |
tree | 48fb26baf887c200c9d22f1abb9a63f220a9387d /src/btree.c | |
parent | f83075201fabeb66ae1a1407ba285d1f7c145a96 (diff) | |
parent | b1d607de25eae569ccdf6b56f5b648124bc4def3 (diff) | |
download | sqlite-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.c | 4 |
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. |