aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/insert.c10
-rw-r--r--src/sqliteInt.h1
-rw-r--r--src/where.c14
3 files changed, 14 insertions, 11 deletions
diff --git a/src/insert.c b/src/insert.c
index e94af0985..c6a0ad705 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -97,16 +97,6 @@ const char *sqlite3IndexAffinityStr(sqlite3 *db, Index *pIdx){
}
/*
-** Return the affinity for a single column of an index.
-*/
-char sqlite3IndexColumnAffinity(sqlite3 *db, Index *pIdx, int iCol){
- if( !pIdx->zColAff ){
- if( sqlite3IndexAffinityStr(db, pIdx)==0 ) return SQLITE_AFF_BLOB;
- }
- return pIdx->zColAff[iCol];
-}
-
-/*
** Compute the affinity string for table pTab, if it has not already been
** computed. As an optimization, omit trailing SQLITE_AFF_BLOB affinities.
**
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 288b25616..a57f00afb 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -3551,7 +3551,6 @@ int sqlite3VarintLen(u64 v);
const char *sqlite3IndexAffinityStr(sqlite3*, Index*);
-char sqlite3IndexColumnAffinity(sqlite3*, Index*, int);
void sqlite3TableAffinity(Vdbe*, Table*, int);
char sqlite3CompareAffinity(Expr *pExpr, char aff2);
int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity);
diff --git a/src/where.c b/src/where.c
index deebed83b..9789b0848 100644
--- a/src/where.c
+++ b/src/where.c
@@ -1127,6 +1127,20 @@ static LogEst whereRangeAdjust(WhereTerm *pTerm, LogEst nNew){
return nRet;
}
+
+#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
+/*
+** Return the affinity for a single column of an index.
+*/
+static char sqlite3IndexColumnAffinity(sqlite3 *db, Index *pIdx, int iCol){
+ if( !pIdx->zColAff ){
+ if( sqlite3IndexAffinityStr(db, pIdx)==0 ) return SQLITE_AFF_BLOB;
+ }
+ return pIdx->zColAff[iCol];
+}
+#endif
+
+
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
/*
** This function is called to estimate the number of rows visited by a