aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeblob.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-03-04 14:34:14 +0000
committerdrh <drh@noemail.net>2014-03-04 14:34:14 +0000
commit7826a9b83fd51f25fb7ef92308cfe4086ca7b0bb (patch)
treecdb49ae9f515de2c5cbefa886ed85bf3af052b98 /src/vdbeblob.c
parent15d4211400da2ac47e226d276eea91701650e0ee (diff)
parent5f1d536b537429454262a5907ec734444e32f075 (diff)
downloadsqlite-7826a9b83fd51f25fb7ef92308cfe4086ca7b0bb.tar.gz
sqlite-7826a9b83fd51f25fb7ef92308cfe4086ca7b0bb.zip
Merge the performance enhancements of trunk (and some obscure bug fixes)
into the sessions branch. FossilOrigin-Name: 7f51ad97f0b24c57453d58faf25eee68861faa23
Diffstat (limited to 'src/vdbeblob.c')
-rw-r--r--src/vdbeblob.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vdbeblob.c b/src/vdbeblob.c
index b999b98e3..43ec130b3 100644
--- a/src/vdbeblob.c
+++ b/src/vdbeblob.c
@@ -135,14 +135,13 @@ int sqlite3_blob_open(
** which closes the b-tree cursor and (possibly) commits the
** transaction.
*/
+ static const int iLn = __LINE__+4;
static const VdbeOpList openBlob[] = {
/* {OP_Transaction, 0, 0, 0}, // 0: Inserted separately */
{OP_TableLock, 0, 0, 0}, /* 1: Acquire a read or write lock */
-
/* One of the following two instructions is replaced by an OP_Noop. */
{OP_OpenRead, 0, 0, 0}, /* 2: Open cursor 0 for reading */
{OP_OpenWrite, 0, 0, 0}, /* 3: Open cursor 0 for read/write */
-
{OP_Variable, 1, 1, 1}, /* 4: Push the rowid to the stack */
{OP_NotExists, 0, 10, 1}, /* 5: Seek the cursor */
{OP_Column, 0, 0, 1}, /* 6 */
@@ -269,7 +268,7 @@ int sqlite3_blob_open(
pTab->pSchema->schema_cookie,
pTab->pSchema->iGeneration);
sqlite3VdbeChangeP5(v, 1);
- sqlite3VdbeAddOpList(v, sizeof(openBlob)/sizeof(VdbeOpList), openBlob);
+ sqlite3VdbeAddOpList(v, ArraySize(openBlob), openBlob, iLn);
/* Make sure a mutex is held on the table to be accessed */
sqlite3VdbeUsesBtree(v, iDb);