aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2018-08-04 17:15:56 +0000
committerdrh <drh@noemail.net>2018-08-04 17:15:56 +0000
commit36a5d88ddeeef353f4e24cfa0a37fdae78600c4c (patch)
treee9c3dfc5162ad87bfcc9c770d3c67b424bf6f267 /src
parentc6ed275fcb7df895811f37f5f25fe4813cb07c89 (diff)
downloadsqlite-36a5d88ddeeef353f4e24cfa0a37fdae78600c4c.tar.gz
sqlite-36a5d88ddeeef353f4e24cfa0a37fdae78600c4c.zip
Fix comments that were made obsolete by the removal of the column cache.
FossilOrigin-Name: 2041231d56c7b02b785015ef4d1af260d61326eab1b2a304c17faa3e33f76441
Diffstat (limited to 'src')
-rw-r--r--src/expr.c6
-rw-r--r--src/select.c11
-rw-r--r--src/sqliteInt.h9
-rw-r--r--src/test1.c1
4 files changed, 2 insertions, 25 deletions
diff --git a/src/expr.c b/src/expr.c
index 889142d1e..271b065a3 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -3262,7 +3262,7 @@ int sqlite3ExprCodeGetColumn(
/*
** Generate code to move content from registers iFrom...iFrom+nReg-1
-** over to iTo..iTo+nReg-1. Keep the column cache up-to-date.
+** over to iTo..iTo+nReg-1.
*/
void sqlite3ExprCodeMove(Parse *pParse, int iFrom, int iTo, int nReg){
assert( iFrom>=iTo+nReg || iFrom+nReg<=iTo );
@@ -5252,10 +5252,6 @@ int sqlite3GetTempReg(Parse *pParse){
/*
** Deallocate a register, making available for reuse for some other
** purpose.
-**
-** If a register is currently being used by the column cache, then
-** the deallocation is deferred until the column cache line that uses
-** the register becomes stale.
*/
void sqlite3ReleaseTempReg(Parse *pParse, int iReg){
if( iReg && pParse->nTempReg<ArraySize(pParse->aTempReg) ){
diff --git a/src/select.c b/src/select.c
index c4ab18d2f..f97efa7a7 100644
--- a/src/select.c
+++ b/src/select.c
@@ -5334,17 +5334,6 @@ static void updateAccumulator(Parse *pParse, int regAcc, AggInfo *pAggInfo){
sqlite3VdbeResolveLabel(v, addrNext);
}
}
-
- /* Before populating the accumulator registers, clear the column cache.
- ** Otherwise, if any of the required column values are already present
- ** in registers, sqlite3ExprCode() may use OP_SCopy to copy the value
- ** to pC->iMem. But by the time the value is used, the original register
- ** may have been used, invalidating the underlying buffer holding the
- ** text or blob value. See ticket [883034dcb5].
- **
- ** Another solution would be to change the OP_SCopy used to copy cached
- ** values to an OP_Copy.
- */
if( regHit==0 && pAggInfo->nAccumulator ){
regHit = regAcc;
}
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 1348d46f6..6304680ab 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -1558,7 +1558,7 @@ struct sqlite3 {
** selectively disable various optimizations.
*/
#define SQLITE_QueryFlattener 0x0001 /* Query flattening */
-#define SQLITE_ColumnCache 0x0002 /* Column cache */
+ /* 0x0002 available for reuse */
#define SQLITE_GroupByOrder 0x0004 /* GROUPBY cover of ORDERBY */
#define SQLITE_FactorOutConst 0x0008 /* Constant factoring */
#define SQLITE_DistinctOpt 0x0010 /* DISTINCT using indexes */
@@ -2958,13 +2958,6 @@ struct AutoincInfo {
};
/*
-** Size of the column cache
-*/
-#ifndef SQLITE_N_COLCACHE
-# define SQLITE_N_COLCACHE 10
-#endif
-
-/*
** At least one instance of the following structure is created for each
** trigger that may be fired while parsing an INSERT, UPDATE or DELETE
** statement. All such objects are stored in the linked list headed at
diff --git a/src/test1.c b/src/test1.c
index 9ffc2e2a8..93c71aa32 100644
--- a/src/test1.c
+++ b/src/test1.c
@@ -6982,7 +6982,6 @@ static int SQLITE_TCLAPI optimization_control(
{ "all", SQLITE_AllOpts },
{ "none", 0 },
{ "query-flattener", SQLITE_QueryFlattener },
- { "column-cache", SQLITE_ColumnCache },
{ "groupby-order", SQLITE_GroupByOrder },
{ "factor-constants", SQLITE_FactorOutConst },
{ "distinct-opt", SQLITE_DistinctOpt },