aboutsummaryrefslogtreecommitdiff
path: root/src/sqliteInt.h
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-03-04 04:12:56 +0000
committerdrh <drh@noemail.net>2014-03-04 04:12:56 +0000
commitd34ab07507de47f6ec6c5f8e39a68f01aff4dce8 (patch)
treefd609b74427efc26463c2f27d624cc695bb6d01a /src/sqliteInt.h
parent6295524e3ddfbcb77bd7a4eed20702c5443464d3 (diff)
parentf926d1ea47939fe1c60d04bcf269b4ad6c1f50a1 (diff)
downloadsqlite-d34ab07507de47f6ec6c5f8e39a68f01aff4dce8.tar.gz
sqlite-d34ab07507de47f6ec6c5f8e39a68f01aff4dce8.zip
Refactor the sqlite3VdbeRecordCompare() routine used to compare btree records.
Create fast-track special case routines to handle the common cases more quickly. This gives a significant performance boost. FossilOrigin-Name: 3325ad5bdc2f81f63b556d6f4d0589d89b142b2b
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r--src/sqliteInt.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index c7f2941d5..90e83206a 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -1586,19 +1586,19 @@ struct KeyInfo {
**
** This structure holds a record that has already been disassembled
** into its constituent fields.
+**
+** The r1 and r2 member variables are only used by the optimized comparison
+** functions vdbeRecordCompareInt() and vdbeRecordCompareString().
*/
struct UnpackedRecord {
KeyInfo *pKeyInfo; /* Collation and sort-order information */
u16 nField; /* Number of entries in apMem[] */
- u8 flags; /* Boolean settings. UNPACKED_... below */
+ i8 default_rc; /* Comparison result if keys are equal */
Mem *aMem; /* Values */
+ int r1; /* Value to return if (lhs > rhs) */
+ int r2; /* Value to return if (rhs < lhs) */
};
-/*
-** Allowed values of UnpackedRecord.flags
-*/
-#define UNPACKED_INCRKEY 0x01 /* Make this key an epsilon larger */
-#define UNPACKED_PREFIX_MATCH 0x02 /* A prefix match is considered OK */
/*
** Each SQL index is represented in memory by an