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

Merge trunk changes into the cursor-hints branch.

FossilOrigin-Name: fbe637620fb7f2c9395c9ddac77d26746d6d4178
This commit is contained in:
drh
2015-09-24 15:06:30 +00:00
39 changed files with 712 additions and 288 deletions

View File

@@ -65,7 +65,7 @@ static const char *explainIndexColumnName(Index *pIdx, int i){
**
** "a=? AND b>?"
*/
static void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop, Table *pTab){
static void explainIndexRange(StrAccum *pStr, WhereLoop *pLoop){
Index *pIndex = pLoop->u.btree.pIndex;
u16 nEq = pLoop->u.btree.nEq;
u16 nSkip = pLoop->nSkip;
@@ -166,7 +166,7 @@ int sqlite3WhereExplainOneScan(
if( zFmt ){
sqlite3StrAccumAppend(&str, " USING ", 7);
sqlite3XPrintf(&str, 0, zFmt, pIdx->zName);
explainIndexRange(&str, pLoop, pItem->pTab);
explainIndexRange(&str, pLoop);
}
}else if( (flags & WHERE_IPK)!=0 && (flags & WHERE_CONSTRAINT)!=0 ){
const char *zRangeOp;
@@ -514,8 +514,8 @@ static int codeAllEqualityTerms(
sqlite3VdbeJumpHere(v, j);
for(j=0; j<nSkip; j++){
sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, j, regBase+j);
assert( pIdx->aiColumn[j]>=0 );
VdbeComment((v, "%s", pIdx->pTable->aCol[pIdx->aiColumn[j]].zName));
testcase( pIdx->aiColumn[j]==(-2) );
VdbeComment((v, "%s", explainIndexColumnName(pIdx, j)));
}
}