aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-09-18 18:09:28 +0000
committerdrh <drh@noemail.net>2015-09-18 18:09:28 +0000
commite63e8a6c78b49a1f59b721dfaf234a545026e963 (patch)
treed8ac6f6070ba5bb30a97c6e3a33f3f54e08c2bdc /src
parente5c61f81c36b71a0d4b39439158f9f39fcbfa22d (diff)
downloadsqlite-e63e8a6c78b49a1f59b721dfaf234a545026e963.tar.gz
sqlite-e63e8a6c78b49a1f59b721dfaf234a545026e963.zip
Fix a crash that can occur with a skip-scan on an index with
expressions when SQLITE_ENABLE_EXPLAIN_COMMENTS is defined. FossilOrigin-Name: 25f34cb9b576a2d4250a06a7dbf88010b1c11675
Diffstat (limited to 'src')
-rw-r--r--src/wherecode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 4fb608401..b83a4fb0a 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -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)));
}
}