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

Optimisations for expressions of the form "<value> IN (SELECT <column> FROM <table>)". (CVS 4579)

FossilOrigin-Name: 56d0e32677744df8570b519fae1c04da4ea4984d
This commit is contained in:
danielk1977
2007-11-29 17:05:18 +00:00
parent ade8648301
commit 9a96b66810
9 changed files with 469 additions and 34 deletions

View File

@@ -2111,10 +2111,12 @@ int sqlite3VdbeRecordCompare(
if( rc==0 ){
if( pKeyInfo->incrKey ){
rc = -1;
}else if( d1<nKey1 ){
rc = 1;
}else if( d2<nKey2 ){
rc = -1;
}else if( !pKeyInfo->prefixIsEqual ){
if( d1<nKey1 ){
rc = 1;
}else if( d2<nKey2 ){
rc = -1;
}
}
}else if( pKeyInfo->aSortOrder && i<pKeyInfo->nField
&& pKeyInfo->aSortOrder[i] ){