From: drh Date: Thu, 14 Apr 2016 13:35:26 +0000 (+0000) Subject: Rename WhereInfo.pResultSet to pDistinctSet to more accurately reflect what X-Git-Tag: version-3.13.0~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1b5ff73cb72b9d0b3f95b810c8bc809348ab8c0;p=thirdparty%2Fsqlite.git Rename WhereInfo.pResultSet to pDistinctSet to more accurately reflect what it represents. FossilOrigin-Name: 5317961411695e107e8cefdeaba62280429979ca --- diff --git a/manifest b/manifest index 90094afc23..46ad911995 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Since\sthe\sreturn\svalue\sof\ssqlite3OsClose()\sis\salways\signored,\swe\smight\sas\nwell\smake\sit\s"void"\sinstead\sof\s"int",\sand\sthereby\ssave\s50\sbytes\sin\sthe\ncompiled\sbinary. -D 2016-04-14T13:16:58.757 +C Rename\sWhereInfo.pResultSet\sto\spDistinctSet\sto\smore\saccurately\sreflect\swhat\nit\srepresents. +D 2016-04-14T13:35:26.807 F Makefile.in eba680121821b8a60940a81454316f47a341487a F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 71b8b16cf9393f68e2e2035486ca104872558836 @@ -455,8 +455,8 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9 F src/wal.c 4db22ed7e77bcf672b1a685d6ddeffba8d5be302 F src/wal.h 2f7c831cf3b071fa548bf2d5cac640846a7ff19c F src/walker.c 0f142b5bd3ed2041fc52d773880748b212e63354 -F src/where.c 24ab561466d92d313747c04edb1a36a7af8663be -F src/whereInt.h 93297d56edd137b7ea004490690fb6e2ce028a34 +F src/where.c bae50f2f18f9e8584549a77363858623b07e4915 +F src/whereInt.h 43466b107862e348e5c2a709cc4812a611e27908 F src/wherecode.c 8fdad9fbba723df1c1e8d07e7ea8507572040340 F src/whereexpr.c eacc0e60d029a082b4fc0cc42ea98544add1319e F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2 @@ -1482,7 +1482,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 5a46914510af4d5557b299db65c68d5df1070766 -R c53fd5d7b34fa75485d686014ecb828c +P 7ee570e7a9a2159a8c0d41805c00f91ca0de00e3 +R ba684bc23f92ec8865bd177b82e2674c U drh -Z 23b6889e197e2a1c3244550aa7848950 +Z 37e357b73543209990ea5ecc9fc91d8e diff --git a/manifest.uuid b/manifest.uuid index e1a2ebd0aa..1f848b4578 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7ee570e7a9a2159a8c0d41805c00f91ca0de00e3 \ No newline at end of file +5317961411695e107e8cefdeaba62280429979ca \ No newline at end of file diff --git a/src/where.c b/src/where.c index b33e062a6d..ca810a3b16 100644 --- a/src/where.c +++ b/src/where.c @@ -3881,9 +3881,9 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ && nRowEst ){ Bitmask notUsed; - int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pResultSet, pFrom, + int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pDistinctSet, pFrom, WHERE_DISTINCTBY, nLoop-1, pFrom->aLoop[nLoop-1], ¬Used); - if( rc==pWInfo->pResultSet->nExpr ){ + if( rc==pWInfo->pDistinctSet->nExpr ){ pWInfo->eDistinct = WHERE_DISTINCT_ORDERED; } } @@ -4098,14 +4098,14 @@ static int whereShortCut(WhereLoopBuilder *pBuilder){ ** used. */ WhereInfo *sqlite3WhereBegin( - Parse *pParse, /* The parser context */ - SrcList *pTabList, /* FROM clause: A list of all tables to be scanned */ - Expr *pWhere, /* The WHERE clause */ - ExprList *pOrderBy, /* An ORDER BY (or GROUP BY) clause, or NULL */ - ExprList *pResultSet, /* Result set of the query */ - u16 wctrlFlags, /* One of the WHERE_* flags defined in sqliteInt.h */ - int iAuxArg /* If WHERE_ONETABLE_ONLY is set, index cursor number, - ** If WHERE_USE_LIMIT, then the limit amount */ + Parse *pParse, /* The parser context */ + SrcList *pTabList, /* FROM clause: A list of all tables to be scanned */ + Expr *pWhere, /* The WHERE clause */ + ExprList *pOrderBy, /* An ORDER BY (or GROUP BY) clause, or NULL */ + ExprList *pDistinctSet, /* Try not to output two rows that duplicate these */ + u16 wctrlFlags, /* The WHERE_* flags defined in sqliteInt.h */ + int iAuxArg /* If WHERE_ONETABLE_ONLY is set, index cursor number + ** If WHERE_USE_LIMIT, then the limit amount */ ){ int nByteWInfo; /* Num. bytes allocated for WhereInfo struct */ int nTabList; /* Number of elements in pTabList */ @@ -4180,7 +4180,7 @@ WhereInfo *sqlite3WhereBegin( pWInfo->pParse = pParse; pWInfo->pTabList = pTabList; pWInfo->pOrderBy = pOrderBy; - pWInfo->pResultSet = pResultSet; + pWInfo->pDistinctSet = pDistinctSet; pWInfo->iBreak = pWInfo->iContinue = sqlite3VdbeMakeLabel(v); pWInfo->wctrlFlags = wctrlFlags; pWInfo->iLimit = iAuxArg; @@ -4253,13 +4253,13 @@ WhereInfo *sqlite3WhereBegin( if( db->mallocFailed ) goto whereBeginError; if( wctrlFlags & WHERE_WANT_DISTINCT ){ - if( isDistinctRedundant(pParse, pTabList, &pWInfo->sWC, pResultSet) ){ + if( isDistinctRedundant(pParse, pTabList, &pWInfo->sWC, pDistinctSet) ){ /* The DISTINCT marking is pointless. Ignore it. */ pWInfo->eDistinct = WHERE_DISTINCT_UNIQUE; }else if( pOrderBy==0 ){ /* Try to ORDER BY the result set to make distinct processing easier */ pWInfo->wctrlFlags |= WHERE_DISTINCTBY; - pWInfo->pOrderBy = pResultSet; + pWInfo->pOrderBy = pDistinctSet; } } @@ -4338,10 +4338,10 @@ WhereInfo *sqlite3WhereBegin( #endif /* Attempt to omit tables from the join that do not effect the result */ if( pWInfo->nLevel>=2 - && pResultSet!=0 + && pDistinctSet!=0 && OptimizationEnabled(db, SQLITE_OmitNoopJoin) ){ - Bitmask tabUsed = sqlite3WhereExprListUsage(pMaskSet, pResultSet); + Bitmask tabUsed = sqlite3WhereExprListUsage(pMaskSet, pDistinctSet); if( sWLB.pOrderBy ){ tabUsed |= sqlite3WhereExprListUsage(pMaskSet, sWLB.pOrderBy); } diff --git a/src/whereInt.h b/src/whereInt.h index eb6ca326f5..ec12b6112f 100644 --- a/src/whereInt.h +++ b/src/whereInt.h @@ -408,7 +408,7 @@ struct WhereInfo { Parse *pParse; /* Parsing and code generating context */ SrcList *pTabList; /* List of tables in the join */ ExprList *pOrderBy; /* The ORDER BY clause or NULL */ - ExprList *pResultSet; /* Result set. DISTINCT operates on these */ + ExprList *pDistinctSet; /* DISTINCT over all these values */ WhereLoop *pLoops; /* List of all WhereLoop objects */ Bitmask revMask; /* Mask of ORDER BY terms that need reversing */ LogEst nRowOut; /* Estimated number of output rows */