diff options
author | drh <drh@noemail.net> | 2014-07-31 22:59:04 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-07-31 22:59:04 +0000 |
commit | 5f1d1d9c870f2377d6907ec05df3c6d38d75cd57 (patch) | |
tree | 80aecd60f5713f3cec379e5292dbc9af8f7ad9c1 /src/expr.c | |
parent | 37e08081f3da7ceab00ff4db996510f924de931a (diff) | |
download | sqlite-5f1d1d9c870f2377d6907ec05df3c6d38d75cd57.tar.gz sqlite-5f1d1d9c870f2377d6907ec05df3c6d38d75cd57.zip |
Refactoring: Change "pIndex->onError!=OE_None" to use a macro:
"IsUniqueIndex(pIndex)". Easier to understand that way.
FossilOrigin-Name: e75b26ee357bb3d3c1a539b05d633ebf314726d7
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index aa55ff7af..3b254f3d3 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1604,7 +1604,7 @@ int sqlite3FindInIndex(Parse *pParse, Expr *pX, int *prNotFound){ for(pIdx=pTab->pIndex; pIdx && eType==0 && affinity_ok; pIdx=pIdx->pNext){ if( (pIdx->aiColumn[0]==iCol) && sqlite3FindCollSeq(db, ENC(db), pIdx->azColl[0], 0)==pReq - && (!mustBeUnique || (pIdx->nKeyCol==1 && pIdx->onError!=OE_None)) + && (!mustBeUnique || (pIdx->nKeyCol==1 && IsUniqueIndex(pIdx))) ){ int iAddr = sqlite3CodeOnce(pParse); VdbeCoverage(v); sqlite3VdbeAddOp3(v, OP_OpenRead, iTab, pIdx->tnum, iDb); |