mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-02 05:54:29 +03:00
Faster decoding of 32-bit variable-length integers in cases were we do not
need to know the number of bytes in the encoding. FossilOrigin-Name: 59a31b16b54a0068c81ee65bc2fa905c2c826e98da3a7ffd8c3ea860a2827b4a
This commit is contained in:
@@ -4503,7 +4503,7 @@ int sqlite3VdbeRecordCompareWithSkip(
|
||||
|
||||
/* RHS is a string */
|
||||
else if( pRhs->flags & MEM_Str ){
|
||||
getVarint32(&aKey1[idx1], serial_type);
|
||||
getVarint32NR(&aKey1[idx1], serial_type);
|
||||
testcase( serial_type==12 );
|
||||
if( serial_type<12 ){
|
||||
rc = -1;
|
||||
@@ -4537,7 +4537,7 @@ int sqlite3VdbeRecordCompareWithSkip(
|
||||
/* RHS is a blob */
|
||||
else if( pRhs->flags & MEM_Blob ){
|
||||
assert( (pRhs->flags & MEM_Zero)==0 || pRhs->n==0 );
|
||||
getVarint32(&aKey1[idx1], serial_type);
|
||||
getVarint32NR(&aKey1[idx1], serial_type);
|
||||
testcase( serial_type==12 );
|
||||
if( serial_type<12 || (serial_type & 0x01) ){
|
||||
rc = -1;
|
||||
@@ -4856,7 +4856,7 @@ int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
|
||||
}
|
||||
|
||||
/* The index entry must begin with a header size */
|
||||
(void)getVarint32((u8*)m.z, szHdr);
|
||||
getVarint32NR((u8*)m.z, szHdr);
|
||||
testcase( szHdr==3 );
|
||||
testcase( szHdr==m.n );
|
||||
testcase( szHdr>0x7fffffff );
|
||||
@@ -4867,7 +4867,7 @@ int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
|
||||
|
||||
/* The last field of the index should be an integer - the ROWID.
|
||||
** Verify that the last entry really is an integer. */
|
||||
(void)getVarint32((u8*)&m.z[szHdr-1], typeRowid);
|
||||
getVarint32NR((u8*)&m.z[szHdr-1], typeRowid);
|
||||
testcase( typeRowid==1 );
|
||||
testcase( typeRowid==2 );
|
||||
testcase( typeRowid==3 );
|
||||
|
||||
Reference in New Issue
Block a user