1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Allow OP_MoveGt and similar to use an array of registers instead of a serialized record. Modify one type of index range scan to use this. (CVS 5028)

FossilOrigin-Name: c448f15aa5ed3dec511426775e893efea324faa1
This commit is contained in:
danielk1977
2008-04-18 09:01:15 +00:00
parent fdc40e9156
commit 751de567c1
6 changed files with 184 additions and 155 deletions

View File

@@ -2401,6 +2401,7 @@ int sqlite3VdbeIdxRowid(BtCursor *pCur, i64 *rowid){
*/
int sqlite3VdbeIdxKeyCompare(
Cursor *pC, /* The cursor to compare against */
UnpackedRecord *pUnpacked,
int nKey, const u8 *pKey, /* The key to compare */
int *res /* Write the comparison result here */
){
@@ -2425,13 +2426,19 @@ int sqlite3VdbeIdxKeyCompare(
return rc;
}
lenRowid = sqlite3VdbeIdxRowidLen((u8*)m.z);
pRec = sqlite3VdbeRecordUnpack(pC->pKeyInfo, nKey, pKey,
if( !pUnpacked ){
pRec = sqlite3VdbeRecordUnpack(pC->pKeyInfo, nKey, pKey,
zSpace, sizeof(zSpace));
}else{
pRec = pUnpacked;
}
if( pRec==0 ){
return SQLITE_NOMEM;
}
*res = sqlite3VdbeRecordCompare(m.n-lenRowid, m.z, pRec);
sqlite3VdbeDeleteUnpackedRecord(pRec);
if( !pUnpacked ){
sqlite3VdbeDeleteUnpackedRecord(pRec);
}
sqlite3VdbeMemRelease(&m);
return SQLITE_OK;
}