mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Make sure the count(*) optimization works correctly on WITHOUT ROWID tables.
FossilOrigin-Name: 91174779786be07d63f3c4a5277602ddc5f0ba26
This commit is contained in:
@@ -4670,7 +4670,7 @@ int sqlite3Select(
|
||||
**
|
||||
** (2011-04-15) Do not do a full scan of an unordered index.
|
||||
**
|
||||
** (2013-10-03) Do not count the entires in a partial index.
|
||||
** (2013-10-03) Do not count the entries in a partial index.
|
||||
**
|
||||
** In practice the KeyInfo structure will not be used. It is only
|
||||
** passed to keep OP_OpenRead happy.
|
||||
@@ -4682,6 +4682,8 @@ int sqlite3Select(
|
||||
&& (!pBest || pIdx->szIdxRow<pBest->szIdxRow)
|
||||
){
|
||||
pBest = pIdx;
|
||||
}else if( pIdx->autoIndex==2 && pBest==0 && !HasRowid(pTab) ){
|
||||
pBest = pIdx;
|
||||
}
|
||||
}
|
||||
if( pBest ){
|
||||
|
||||
Reference in New Issue
Block a user