mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Minor enhancements to comments and clarification of the code.
FossilOrigin-Name: cbec30d0c49a3f618c3df3ae0ca3d651b48841c2
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Add\sa\smissing\sVdbeCoverage()\smacro\son\san\sOP_Found\sopcode\sadded\sin\sthe\sprevious\ncheck-in.
|
C Minor\senhancements\sto\scomments\sand\sclarification\sof\sthe\scode.
|
||||||
D 2014-05-26T20:25:34.589
|
D 2014-05-26T22:01:00.008
|
||||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||||
F Makefile.in dd2b1aba364ff9b05de41086f74407f285c57670
|
F Makefile.in dd2b1aba364ff9b05de41086f74407f285c57670
|
||||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||||
@@ -294,7 +294,7 @@ F src/vtab.c 21b932841e51ebd7d075e2d0ad1415dce8d2d5fd
|
|||||||
F src/wal.c 76e7fc6de229bea8b30bb2539110f03a494dc3a8
|
F src/wal.c 76e7fc6de229bea8b30bb2539110f03a494dc3a8
|
||||||
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
||||||
F src/walker.c 11edb74d587bc87b33ca96a5173e3ec1b8389e45
|
F src/walker.c 11edb74d587bc87b33ca96a5173e3ec1b8389e45
|
||||||
F src/where.c d46d73c76f48ede86e0e5bb112b2bcc91947bfaa
|
F src/where.c b5719b11c414874826c676cf8c8455cb2939a30c
|
||||||
F src/whereInt.h 6804c2e5010378568c2bb1350477537755296a46
|
F src/whereInt.h 6804c2e5010378568c2bb1350477537755296a46
|
||||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||||
@@ -1173,7 +1173,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
|||||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||||
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
|
||||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||||
P 2c7e277bbebd5c93dec53d381d9737909d40d846
|
P b4980a07e287480beddb2c6633c733520e05d074
|
||||||
R 3707fb894adfd77b824ab9f7bdc17e79
|
R 8f53ac145522e21d9a1c5059c77f2db7
|
||||||
U drh
|
U drh
|
||||||
Z 370b7f2e785b22f24333c303cca00bc0
|
Z ad528aef359e7c77cf0a017e9208591c
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
b4980a07e287480beddb2c6633c733520e05d074
|
cbec30d0c49a3f618c3df3ae0ca3d651b48841c2
|
||||||
18
src/where.c
18
src/where.c
@@ -3293,6 +3293,10 @@ static Bitmask codeOneLoopStart(
|
|||||||
**
|
**
|
||||||
** B: <after the loop>
|
** B: <after the loop>
|
||||||
**
|
**
|
||||||
|
** Added 2014-05-26: If the table is a WITHOUT ROWID table, then
|
||||||
|
** use an ephermeral index instead of a RowSet to record the primary
|
||||||
|
** keys of the rows we have already seen.
|
||||||
|
**
|
||||||
*/
|
*/
|
||||||
WhereClause *pOrWc; /* The OR-clause broken out into subterms */
|
WhereClause *pOrWc; /* The OR-clause broken out into subterms */
|
||||||
SrcList *pOrTab; /* Shortened table list or OR-clause generation */
|
SrcList *pOrTab; /* Shortened table list or OR-clause generation */
|
||||||
@@ -3340,7 +3344,8 @@ static Bitmask codeOneLoopStart(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the rowset register to contain NULL. An SQL NULL is
|
/* Initialize the rowset register to contain NULL. An SQL NULL is
|
||||||
** equivalent to an empty rowset.
|
** equivalent to an empty rowset. Or, create an ephermeral index
|
||||||
|
** capable of holding primary keys in the case of a WITHOUT ROWID.
|
||||||
**
|
**
|
||||||
** Also initialize regReturn to contain the address of the instruction
|
** Also initialize regReturn to contain the address of the instruction
|
||||||
** immediately following the OP_Return at the bottom of the loop. This
|
** immediately following the OP_Return at the bottom of the loop. This
|
||||||
@@ -3401,6 +3406,7 @@ static Bitmask codeOneLoopStart(
|
|||||||
if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
|
if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
|
||||||
WhereInfo *pSubWInfo; /* Info for single OR-term scan */
|
WhereInfo *pSubWInfo; /* Info for single OR-term scan */
|
||||||
Expr *pOrExpr = pOrTerm->pExpr;
|
Expr *pOrExpr = pOrTerm->pExpr;
|
||||||
|
int j1 = 0; /* Address of jump operation */
|
||||||
if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
|
if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
|
||||||
pAndExpr->pLeft = pOrExpr;
|
pAndExpr->pLeft = pOrExpr;
|
||||||
pOrExpr = pAndExpr;
|
pOrExpr = pAndExpr;
|
||||||
@@ -3417,12 +3423,10 @@ static Bitmask codeOneLoopStart(
|
|||||||
);
|
);
|
||||||
if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
|
if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
|
||||||
int r;
|
int r;
|
||||||
int addr; /* Address just past Gosub coded below */
|
|
||||||
int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
|
int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
|
||||||
if( HasRowid(pTab) ){
|
if( HasRowid(pTab) ){
|
||||||
r = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, regRowid, 0);
|
r = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, regRowid, 0);
|
||||||
addr = sqlite3VdbeCurrentAddr(v)+2;
|
j1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0, r,iSet);
|
||||||
sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, addr, r, iSet);
|
|
||||||
VdbeCoverage(v);
|
VdbeCoverage(v);
|
||||||
}else{
|
}else{
|
||||||
Index *pPk = sqlite3PrimaryKeyIndex(pTab);
|
Index *pPk = sqlite3PrimaryKeyIndex(pTab);
|
||||||
@@ -3448,8 +3452,7 @@ static Bitmask codeOneLoopStart(
|
|||||||
** need to insert the key into the temp table, as it will never
|
** need to insert the key into the temp table, as it will never
|
||||||
** be tested for. */
|
** be tested for. */
|
||||||
if( iSet ){
|
if( iSet ){
|
||||||
addr = sqlite3VdbeCurrentAddr(v) + 2 + ((iSet>0) ? 2 : 0);
|
j1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
|
||||||
sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, addr, r, nPk);
|
|
||||||
VdbeCoverage(v);
|
VdbeCoverage(v);
|
||||||
}
|
}
|
||||||
if( iSet>=0 ){
|
if( iSet>=0 ){
|
||||||
@@ -3461,10 +3464,9 @@ static Bitmask codeOneLoopStart(
|
|||||||
/* Release the array of temp registers */
|
/* Release the array of temp registers */
|
||||||
sqlite3ReleaseTempRange(pParse, r, nPk);
|
sqlite3ReleaseTempRange(pParse, r, nPk);
|
||||||
}
|
}
|
||||||
assert( db->mallocFailed
|
|
||||||
|| iSet==0 || addr==(sqlite3VdbeCurrentAddr(v)+1) );
|
|
||||||
}
|
}
|
||||||
sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
|
sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
|
||||||
|
if( j1 ) sqlite3VdbeJumpHere(v, j1);
|
||||||
|
|
||||||
/* The pSubWInfo->untestedTerms flag means that this OR term
|
/* The pSubWInfo->untestedTerms flag means that this OR term
|
||||||
** contained one or more AND term from a notReady table. The
|
** contained one or more AND term from a notReady table. The
|
||||||
|
|||||||
Reference in New Issue
Block a user