1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Remove an unnecessary conditional from the EXPLAIN QUERY PLAN logic.

FossilOrigin-Name: c5dc83ebded914f07286b7f98d0a50c28c16f609
This commit is contained in:
drh
2014-10-11 01:22:16 +00:00
parent 1f8817cb32
commit c631faa922
3 changed files with 8 additions and 10 deletions

View File

@@ -2838,9 +2838,7 @@ static void explainOneScan(
pIdx = pLoop->u.btree.pIndex;
assert( !(flags&WHERE_AUTO_INDEX) || (flags&WHERE_IDX_ONLY) );
if( !HasRowid(pItem->pTab) && IsPrimaryKeyIndex(pIdx) ){
if( pLoop->u.btree.nEq>0
|| (pLoop->wsFlags & (WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))!=0
){
if( isSearch ){
zFmt = "PRIMARY KEY";
}
}else if( flags & WHERE_AUTO_INDEX ){