diff options
author | drh <drh@noemail.net> | 2014-08-21 16:09:36 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-08-21 16:09:36 +0000 |
commit | 2571e4eddd05dceb9c707e8356153d0836d84228 (patch) | |
tree | 323ddb8b65cd40629b860f2b64cd1fb71efd023a /src/delete.c | |
parent | 3a432b0b475fa5ae550a1ab35279c2647344138c (diff) | |
parent | b6b4b79f344096791542265763467fc90f139c2e (diff) | |
download | sqlite-2571e4eddd05dceb9c707e8356153d0836d84228.tar.gz sqlite-2571e4eddd05dceb9c707e8356153d0836d84228.zip |
Merge all recent trunk changes, especially the fix for
ticket [369d57fb8e5ccdff06f1], but also the skip-scan improvement and
performance improvements in the b-tree code.
FossilOrigin-Name: 0b9e2c3269695713b538561d999c68097db70f0c
Diffstat (limited to 'src/delete.c')
-rw-r--r-- | src/delete.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/delete.c b/src/delete.c index fb6fa77dd..4392de383 100644 --- a/src/delete.c +++ b/src/delete.c @@ -473,10 +473,11 @@ void sqlite3DeleteFrom( ** triggers. */ if( !isView ){ + testcase( IsVirtual(pTab) ); sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, iTabCur, aToOpen, &iDataCur, &iIdxCur); - assert( pPk || iDataCur==iTabCur ); - assert( pPk || iIdxCur==iDataCur+1 ); + assert( pPk || IsVirtual(pTab) || iDataCur==iTabCur ); + assert( pPk || IsVirtual(pTab) || iIdxCur==iDataCur+1 ); } /* Set up a loop over the rowids/primary-keys that were found in the @@ -484,7 +485,8 @@ void sqlite3DeleteFrom( */ if( okOnePass ){ /* Just one row. Hence the top-of-loop is a no-op */ - assert( nKey==nPk ); /* OP_Found will use an unpacked key */ + assert( nKey==nPk ); /* OP_Found will use an unpacked key */ + assert( !IsVirtual(pTab) ); if( aToOpen[iDataCur-iTabCur] ){ assert( pPk!=0 ); sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, addrBypass, iKey, nKey); |