mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-21 09:00:59 +03:00
Record in the WhereLoop object the set of virtual table constraints that
need not be separately checked. FossilOrigin-Name: b49fa74561f38c945be6149693678fd6518c2de4
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
||||
C Merge\sthe\slatest\strunk\schanges\sinto\sthe\sNGQP\sbranch.
|
||||
D 2013-05-24T13:55:23.561
|
||||
C Record\sin\sthe\sWhereLoop\sobject\sthe\sset\sof\svirtual\stable\sconstraints\sthat\nneed\snot\sbe\sseparately\schecked.
|
||||
D 2013-05-24T14:52:03.958
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in f6b58b7bdf6535f0f0620c486dd59aa4662c0b4f
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@@ -265,7 +265,7 @@ F src/vtab.c b05e5f1f4902461ba9f5fc49bb7eb7c3a0741a83
|
||||
F src/wal.c 436bfceb141b9423c45119e68e444358ee0ed35d
|
||||
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
|
||||
F src/walker.c 4fa43583d0a84b48f93b1e88f11adf2065be4e73
|
||||
F src/where.c 627bf1af3ab30e1efcc7ac362b15e7e945e9250d
|
||||
F src/where.c 2fd11c00ffc37a65b762c8b2bbf5710723eefdd7
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||
F test/aggnested.test 45c0201e28045ad38a530b5a144b73cd4aa2cfd6
|
||||
@@ -1066,7 +1066,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
|
||||
P f783e8e6b10de44029c7c5f57e4648a4a677ca1b 61a10452399db28cd5ea4ba9d416b87a34c2eddb
|
||||
R 5ae2bb9eca4144ac9f28ec145cae1f78
|
||||
P 7c8f992c04504a132686ad0652efdff19e43480d
|
||||
R 91429a505370ccdd08f4d1fe64f3bf63
|
||||
U drh
|
||||
Z e63f19ec26c366b47598ade89ccbddd5
|
||||
Z 676fd5c7993f5cc12a1abed75be6a4c4
|
||||
|
||||
@@ -1 +1 @@
|
||||
7c8f992c04504a132686ad0652efdff19e43480d
|
||||
b49fa74561f38c945be6149693678fd6518c2de4
|
||||
@@ -76,6 +76,7 @@ struct WhereLoop {
|
||||
int idxNum; /* Index number */
|
||||
u8 needFree; /* True if sqlite3_free(idxStr) is needed */
|
||||
u8 isOrdered; /* True if satisfies ORDER BY */
|
||||
u16 omitMask; /* Terms that may be omitted */
|
||||
char *idxStr; /* Index identifier string */
|
||||
} vtab;
|
||||
} u;
|
||||
@@ -5101,9 +5102,10 @@ static void whereLoopPrint(WhereLoop *p, SrcList *pTabList){
|
||||
}else{
|
||||
char *z;
|
||||
if( p->u.vtab.idxStr ){
|
||||
z = sqlite3_mprintf("(%d,\"%s\")", p->u.vtab.idxNum,p->u.vtab.idxStr);
|
||||
z = sqlite3_mprintf("(%d,\"%s\",%x)",
|
||||
p->u.vtab.idxNum, p->u.vtab.idxStr, p->u.vtab.omitMask);
|
||||
}else{
|
||||
z = sqlite3_mprintf("(%d)", p->u.vtab.idxNum);
|
||||
z = sqlite3_mprintf("(%d,%x)", p->u.vtab.idxNum, p->u.vtab.omitMask);
|
||||
}
|
||||
sqlite3DebugPrintf(" %-15s", z);
|
||||
sqlite3_free(z);
|
||||
@@ -5629,6 +5631,7 @@ static int whereLoopAddVirtual(
|
||||
pNew->prereq = 0;
|
||||
mxTerm = -1;
|
||||
for(i=0; i<pBuilder->mxTerm; i++) pNew->aTerm[i] = 0;
|
||||
pNew->u.vtab.omitMask = 0;
|
||||
for(i=0; i<pIdxInfo->nConstraint; i++, pIdxCons++){
|
||||
if( (iTerm = pUsage[i].argvIndex - 1)>=0 ){
|
||||
if( iTerm>=pBuilder->mxTerm ) break;
|
||||
@@ -5646,6 +5649,7 @@ static int whereLoopAddVirtual(
|
||||
pNew->prereq |= pTerm->prereqRight;
|
||||
pNew->aTerm[iTerm] = pTerm;
|
||||
if( iTerm>mxTerm ) mxTerm = iTerm;
|
||||
if( iTerm<16 && pUsage[i].omit ) pNew->u.vtab.omitMask |= 1<<i;
|
||||
if( (pTerm->eOperator & WO_IN)!=0 ){
|
||||
if( pUsage[i].omit==0 ){
|
||||
/* Do not attempt to use an IN constraint if the virtual table
|
||||
|
||||
Reference in New Issue
Block a user