aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/select.c b/src/select.c
index b3939ba64..ba6f6551a 100644
--- a/src/select.c
+++ b/src/select.c
@@ -4498,7 +4498,7 @@ static void explainSimpleCount(
Index *pIdx /* Index used to optimize scan, or NULL */
){
if( pParse->explain==2 ){
- int bCover = (pIdx!=0 && (HasRowid(pTab) || pIdx->autoIndex!=2));
+ int bCover = (pIdx!=0 && (HasRowid(pTab) || !IsPrimaryKeyIndex(pIdx)));
char *zEqp = sqlite3MPrintf(pParse->db, "SCAN TABLE %s%s%s",
pTab->zName,
bCover ? " USING COVERING INDEX " : "",