aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/insert.c1
-rw-r--r--src/wherecode.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/insert.c b/src/insert.c
index 04d3d580f..d9078b89d 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -99,6 +99,7 @@ const char *sqlite3IndexAffinityStr(sqlite3 *db, Index *pIdx){
aff = sqlite3ExprAffinity(pIdx->aColExpr->a[n].pExpr);
}
if( aff<SQLITE_AFF_BLOB ) aff = SQLITE_AFF_BLOB;
+ if( aff>SQLITE_AFF_NUMERIC) aff = SQLITE_AFF_NUMERIC;
pIdx->zColAff[n] = aff;
}
pIdx->zColAff[n] = 0;
diff --git a/src/wherecode.c b/src/wherecode.c
index 2fbcba17e..22ed905f4 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -755,6 +755,7 @@ static int codeAllEqualityTerms(
if( sqlite3ExprNeedsNoAffinityChange(pRight, zAff[j]) ){
zAff[j] = SQLITE_AFF_BLOB;
}
+ if( zAff[j]==SQLITE_AFF_REAL ) zAff[j] = SQLITE_AFF_NUMERIC;
}
}
}