aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeblob.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-02-03 01:55:44 +0000
committerdrh <drh@noemail.net>2016-02-03 01:55:44 +0000
commit1b32554b80cd84bbc93075e5b4dd803bdcf65748 (patch)
tree71679ee7134a15707c6f3563cec67fe2212cad7f /src/vdbeblob.c
parentb06347a5dcab801ba317cbf36043f8f70df0deec (diff)
downloadsqlite-1b32554b80cd84bbc93075e5b4dd803bdcf65748.tar.gz
sqlite-1b32554b80cd84bbc93075e5b4dd803bdcf65748.zip
Enhance the internal sqlite3VdbeAddOpList() interface to automatically update
jump destinations. Use this feature to simplify the AUTOINCREMENT code generator. FossilOrigin-Name: ae8b9d2edf1b5aef6108e729754911db7682b6a3
Diffstat (limited to 'src/vdbeblob.c')
-rw-r--r--src/vdbeblob.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/vdbeblob.c b/src/vdbeblob.c
index f9015ad6f..2ba5301e7 100644
--- a/src/vdbeblob.c
+++ b/src/vdbeblob.c
@@ -249,19 +249,17 @@ int sqlite3_blob_open(
** which closes the b-tree cursor and (possibly) commits the
** transaction.
*/
- static const int iLn = VDBE_OFFSET_LINENO(4);
+ static const int iLn = VDBE_OFFSET_LINENO(2);
static const VdbeOpList openBlob[] = {
- /* addr/ofst */
- /* {OP_Transaction, 0, 0, 0}, // 0/ inserted separately */
- {OP_TableLock, 0, 0, 0}, /* 1/0: Acquire a read or write lock */
- {OP_OpenRead, 0, 0, 0}, /* 2/1: Open a cursor */
- {OP_Variable, 1, 1, 0}, /* 3/2: Move ?1 into reg[1] */
- {OP_NotExists, 0, 8, 1}, /* 4/3: Seek the cursor */
- {OP_Column, 0, 0, 1}, /* 5/4 */
- {OP_ResultRow, 1, 0, 0}, /* 6/5 */
- {OP_Goto, 0, 3, 0}, /* 7/6 */
- {OP_Close, 0, 0, 0}, /* 8/7 */
- {OP_Halt, 0, 0, 0}, /* 9/8 */
+ {OP_TableLock, 0, 0, 0}, /* 0: Acquire a read or write lock */
+ {OP_OpenRead, 0, 0, 0}, /* 1: Open a cursor */
+ {OP_Variable, 1, 1, 0}, /* 2: Move ?1 into reg[1] */
+ {OP_NotExists, 0, 7, 1}, /* 3: Seek the cursor */
+ {OP_Column, 0, 0, 1}, /* 4 */
+ {OP_ResultRow, 1, 0, 0}, /* 5 */
+ {OP_Goto, 0, 2, 0}, /* 6 */
+ {OP_Close, 0, 0, 0}, /* 7 */
+ {OP_Halt, 0, 0, 0}, /* 8 */
};
Vdbe *v = (Vdbe *)pBlob->pStmt;
int iDb = sqlite3SchemaToIndex(db, pTab->pSchema);