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

"make test" now passing.

FossilOrigin-Name: addd7f466d6ff55f82d907286650c26b06e9397b
This commit is contained in:
drh
2013-06-12 17:08:06 +00:00
parent fd5874d23d
commit 4fe425ad79
17 changed files with 98 additions and 89 deletions

View File

@@ -1908,7 +1908,8 @@ static WhereCost whereCostFromDouble(double x){
** logN is a little off.
*/
static WhereCost estLog(WhereCost N){
return whereCostFromInt(N) - 33;
WhereCost x = whereCostFromInt(N);
return x>33 ? x - 33 : 0;
}
/*
@@ -4431,7 +4432,8 @@ static int whereLoopAddBtree(
/* Automatic indexes */
if( !pBuilder->pBest
&& (pWInfo->pParse->db->flags & SQLITE_AutoIndex)!=0
&& (pWInfo->pParse->db->flags & SQLITE_AutoIndex)!=0
&& pSrc->pIndex==0
&& !pSrc->viaCoroutine
&& !pSrc->notIndexed
&& !pSrc->isCorrelated
@@ -5526,6 +5528,13 @@ WhereInfo *sqlite3WhereBegin(
pWhere = 0;
}
/* Special case: No FROM clause
*/
if( nTabList==0 ){
if( pOrderBy ) pWInfo->bOBSat = 1;
if( pDistinct ) pWInfo->eDistinct = WHERE_DISTINCT_UNIQUE;
}
/* Assign a bit from the bitmask to every term in the FROM clause.
**
** When assigning bitmask values to FROM clause cursors, it must be