diff options
author | drh <drh@noemail.net> | 2015-11-05 20:25:09 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-11-05 20:25:09 +0000 |
commit | 70528d7868e67752833c6bac7b34f4d5d652d130 (patch) | |
tree | 372b20b32551bbbe108cd161a8e2d93bcd8beea5 /src/sqliteInt.h | |
parent | d82211db56f53b2ddf0e62904f3c691d24bd2afb (diff) | |
download | sqlite-70528d7868e67752833c6bac7b34f4d5d652d130.tar.gz sqlite-70528d7868e67752833c6bac7b34f4d5d652d130.zip |
The top of an index equality loop normally starts with OP_SeekGE and OP_IdxGT.
This check-in adds a flag to OP_SeekGE such that it fails immediately if
the key is not equal, then jumps over the OP_IdxGT, saving a call to the key
comparison functions. Consider this check-in a proof-of-concept. It needs
improvement before going on trunk. Some tests fail, but only because they
new use fewer key comparisons than expected (which is a good thing!).
FossilOrigin-Name: 32e31b9bc8664afcd326a1ff3892d86dc5202474
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 96f43070c..b86de1b2b 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1830,12 +1830,13 @@ struct KeyInfo { */ struct UnpackedRecord { KeyInfo *pKeyInfo; /* Collation and sort-order information */ + Mem *aMem; /* Values */ u16 nField; /* Number of entries in apMem[] */ i8 default_rc; /* Comparison result if keys are equal */ u8 errCode; /* Error detected by xRecordCompare (CORRUPT or NOMEM) */ - Mem *aMem; /* Values */ - int r1; /* Value to return if (lhs > rhs) */ - int r2; /* Value to return if (rhs < lhs) */ + i8 r1; /* Value to return if (lhs > rhs) */ + i8 r2; /* Value to return if (rhs < lhs) */ + u8 eqSeen; /* True if an equality comparison has been seen */ }; |