1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Merge changes from the trunk into the threads branch.

FossilOrigin-Name: 416cb091267de91b9cadee9f7453b8627570b7d3
This commit is contained in:
drh
2014-05-29 20:24:20 +00:00
24 changed files with 574 additions and 254 deletions

View File

@@ -4527,7 +4527,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 " : "",