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/insert.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/insert.c')
-rw-r--r-- | src/insert.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/insert.c b/src/insert.c index d0eced5b5..ebbc448e0 100644 --- a/src/insert.c +++ b/src/insert.c @@ -1624,6 +1624,9 @@ void sqlite3CompleteInsertion( ** For a WITHOUT ROWID table, *piDataCur will be somewhere in the range ** of *piIdxCurs, depending on where the PRIMARY KEY index appears on the ** pTab->pIndex list. +** +** If pTab is a virtual table, then this routine is a no-op and the +** *piDataCur and *piIdxCur values are left uninitialized. */ int sqlite3OpenTableAndIndices( Parse *pParse, /* Parsing context */ @@ -1642,9 +1645,9 @@ int sqlite3OpenTableAndIndices( assert( op==OP_OpenRead || op==OP_OpenWrite ); if( IsVirtual(pTab) ){ - assert( aToOpen==0 ); - *piDataCur = 0; - *piIdxCur = 1; + /* This routine is a no-op for virtual tables. Leave the output + ** variables *piDataCur and *piIdxCur uninitialized so that valgrind + ** can detect if they are used by mistake in the caller. */ return 0; } iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema); |