mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Comment improvements. Put ALWAYS and NEVER macros on three unreachable
branches. FossilOrigin-Name: 397617009e07004596476d6f5644fdf84c376f54
This commit is contained in:
16
manifest
16
manifest
@@ -1,5 +1,5 @@
|
||||
C Remove\san\sunreachable\sbranch\sfrom\ssqlite3ExprAffinity()
|
||||
D 2016-08-26T01:02:09.972
|
||||
C Comment\simprovements.\s\sPut\sALWAYS\sand\sNEVER\smacros\son\sthree\sunreachable\nbranches.
|
||||
D 2016-08-26T03:42:57.323
|
||||
F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 5017381e4853b1472e01d5bb926be1268eba429c
|
||||
@@ -338,7 +338,7 @@ F src/ctime.c e77f3dc297b4b65c96da78b4ae4272fdfae863d7
|
||||
F src/date.c 95c9a8d00767e7221a8e9a31f4e913fc8029bf6b
|
||||
F src/dbstat.c 19ee7a4e89979d4df8e44cfac7a8f905ec89b77d
|
||||
F src/delete.c 76c084f0265f4a3cd1ecf17eee112a94f1ccbc05
|
||||
F src/expr.c 2fe35bc5e93ac4c692b0b8c563ed6fc022247ed4
|
||||
F src/expr.c bca7140549a34c8a71a4cf0605666403af390477
|
||||
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
|
||||
F src/fkey.c e2be0968c1adc679c87e467aa5b4f167588f38a8
|
||||
F src/func.c 29cc9acb170ec1387b9f63eb52cd85f8de96c771
|
||||
@@ -465,10 +465,10 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
||||
F src/wal.c 02eeecc265f6ffd0597378f5d8ae9070b62a406a
|
||||
F src/wal.h 6dd221ed384afdc204bc61e25c23ef7fd5a511f2
|
||||
F src/walker.c 2d2cc7fb0f320f7f415215d7247f3c584141ac09
|
||||
F src/where.c c7cdfd54f383090bb801cdd50d36de1a24684bb2
|
||||
F src/where.c 2f60a506364b22c48371b8b94089c4028a694a0a
|
||||
F src/whereInt.h 14dd243e13b81cbb0a66063d38b70f93a7d6e613
|
||||
F src/wherecode.c 5a5528c39be09593cada6ae465d7a0f48db0077f
|
||||
F src/whereexpr.c aa54bf11adf6bc7e52f56281f436ab5fd421ce16
|
||||
F src/whereexpr.c 7f9ada866d48d15d09754ae819c1c40efe3b2aff
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
|
||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||
@@ -1521,7 +1521,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 5789aab8ef59ae1cdfdae123b078ee03da6e08ed
|
||||
R 9ebda3b476f4e068ca78a071831449eb
|
||||
P 9d96f61481704e5ec399ee425f0ebb246902ecc5
|
||||
R 0b547643c3844e6bc7fc81ff0189aeeb
|
||||
U drh
|
||||
Z ef957217ed40f2345a57bc50f3f65b90
|
||||
Z e947ea7de839ffcabb8c6e9f9aa97cfb
|
||||
|
||||
@@ -1 +1 @@
|
||||
9d96f61481704e5ec399ee425f0ebb246902ecc5
|
||||
397617009e07004596476d6f5644fdf84c376f54
|
||||
@@ -2443,9 +2443,9 @@ int sqlite3CodeSubselect(
|
||||
ExprList *pEList = pSelect->pEList;
|
||||
|
||||
assert( !isRowid );
|
||||
if( pEList->nExpr!=nVal ){
|
||||
sqlite3SubselectError(pParse, pEList->nExpr, nVal);
|
||||
}else{
|
||||
/* If the LHS and RHS of the IN operator do not match, that
|
||||
** error will have been caught long before we reach this point. */
|
||||
if( ALWAYS(pEList->nExpr==nVal) ){
|
||||
SelectDest dest;
|
||||
int i;
|
||||
sqlite3SelectDestInit(&dest, SRT_Set, pExpr->iTable);
|
||||
|
||||
15
src/where.c
15
src/where.c
@@ -2224,7 +2224,11 @@ static void whereLoopOutputAdjust(
|
||||
** this case is 3.
|
||||
*/
|
||||
int whereRangeVectorLen(
|
||||
Parse *pParse, int iCur, Index *pIdx, int nEq, WhereTerm *pTerm
|
||||
Parse *pParse, /* Parsing context */
|
||||
int iCur, /* Cursor open on pIdx */
|
||||
Index *pIdx, /* The index to be used for a inequality constraint */
|
||||
int nEq, /* Number of prior equality constraints on same index */
|
||||
WhereTerm *pTerm /* The vector inequality constraint */
|
||||
){
|
||||
int nCmp = sqlite3ExprVectorSize(pTerm->pExpr->pLeft);
|
||||
int i;
|
||||
@@ -2261,7 +2265,8 @@ int whereRangeVectorLen(
|
||||
if( aff!=idxaff ) break;
|
||||
|
||||
pColl = sqlite3BinaryCompareCollSeq(pParse, pLhs, pRhs);
|
||||
if( pColl==0 || sqlite3StrICmp(pColl->zName, pIdx->azColl[i+nEq]) ) break;
|
||||
if( NEVER(pColl==0) ) break;
|
||||
if( sqlite3StrICmp(pColl->zName, pIdx->azColl[i+nEq]) ) break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
@@ -3573,7 +3578,11 @@ static i8 wherePathSatisfiesOrderBy(
|
||||
isOrderDistinct = 0;
|
||||
}
|
||||
continue;
|
||||
}else if( eOp & WO_IN ){
|
||||
}else if( ALWAYS(eOp & WO_IN) ){
|
||||
/* ALWAYS() justification: eOp is an equality operator due to the
|
||||
** j<pLoop->u.btree.nEq constraint above. Any equality other
|
||||
** than WO_IN is captured by the previous "if". So this one
|
||||
** always has to be WO_IN. */
|
||||
Expr *pX = pLoop->aLTerm[j]->pExpr;
|
||||
for(i=j+1; i<pLoop->u.btree.nEq; i++){
|
||||
if( pLoop->aLTerm[i]->pExpr==pX ){
|
||||
|
||||
@@ -846,7 +846,9 @@ static int exprMightBeIndexed(
|
||||
** inequality constraint (>, <, >= or <=), perform the processing
|
||||
** on the first element of the vector. */
|
||||
assert( TK_GT+1==TK_LE && TK_GT+2==TK_LT && TK_GT+3==TK_GE );
|
||||
if( pExpr->op==TK_VECTOR && (op>=TK_GT && op<=TK_GE) ){
|
||||
assert( TK_IS<TK_GE && TK_ISNULL<TK_GE && TK_IN<TK_GE );
|
||||
assert( op<=TK_GE );
|
||||
if( pExpr->op==TK_VECTOR && (op>=TK_GT && ALWAYS(op<=TK_GE)) ){
|
||||
pExpr = pExpr->x.pList->a[0].pExpr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user