aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyze.c')
-rw-r--r--src/analyze.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.c b/src/analyze.c
index 43aff141b..f9c03dc84 100644
--- a/src/analyze.c
+++ b/src/analyze.c
@@ -1129,7 +1129,7 @@ static void analyzeOneTable(
*/
sqlite3VdbeAddOp0(v, OP_Goto);
addrNextRow = sqlite3VdbeCurrentAddr(v);
- if( nColTest==1 && pIdx->nKeyCol==1 && pIdx->onError!=OE_None ){
+ if( nColTest==1 && pIdx->nKeyCol==1 && IsUniqueIndex(pIdx) ){
/* For a single-column UNIQUE index, once we have found a non-NULL
** row, we know that all the rest will be distinct, so skip
** subsequent distinctness tests. */