/ Check-in [979da752]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not assume that 'char' is signed. Make it explicit.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | broken-on-arm
Files: files | file ages | folders
SHA1: 979da752e6f8767a61a8efed824ffad9605d0f4c
User & Date: drh 2014-03-04 00:15:16
Context
2014-03-04
04:04
Fix more instances of assuming 'char' is signed. And, make sure to never shift a signed integer. Closed-Leaf check-in: f10130ed user: drh tags: broken-on-arm
00:15
Do not assume that 'char' is signed. Make it explicit. check-in: 979da752 user: drh tags: broken-on-arm
2014-03-03
21:59
Refactor the sqlite3VdbeRecordCompare() routine used to compare btree records. Create a couple of fast-track routines to handle the common cases of a string with BINARY collation or integer values as the left-most column. This gives a significant performance boost in common use. Oops: This build does not work on the Beaglebone where "char" defaults to unsigned. check-in: aec5473a user: drh tags: broken-on-arm
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
**
** 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[] */
  char 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) */
};


/*







|







1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
**
** 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[] */
  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) */
};


/*