1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Enhancements to the query planner to make use of indices for ORDER BY even

when IN constraints are in the WHERE clause.  Add extended error codes for
all SQLITE_CONSTRAINT errors.

FossilOrigin-Name: 7e14dc734d7d941da5c3aa6612e26d93b5b929bd
This commit is contained in:
drh
2013-02-13 13:42:50 +00:00
39 changed files with 848 additions and 224 deletions

View File

@@ -879,7 +879,7 @@ case OP_Halt: {
if( rc==SQLITE_BUSY ){
p->rc = rc = SQLITE_BUSY;
}else{
assert( rc==SQLITE_OK || p->rc==SQLITE_CONSTRAINT );
assert( rc==SQLITE_OK || (p->rc&0xff)==SQLITE_CONSTRAINT );
assert( rc==SQLITE_OK || db->nDeferredCons>0 );
rc = p->rc ? SQLITE_ERROR : SQLITE_DONE;
}
@@ -6115,7 +6115,7 @@ case OP_VUpdate: {
assert( nArg>1 && apArg[0] && (apArg[0]->flags&MEM_Null) );
db->lastRowid = lastRowid = rowid;
}
if( rc==SQLITE_CONSTRAINT && pOp->p4.pVtab->bConstraint ){
if( (rc&0xff)==SQLITE_CONSTRAINT && pOp->p4.pVtab->bConstraint ){
if( pOp->p5==OE_Ignore ){
rc = SQLITE_OK;
}else{