aboutsummaryrefslogtreecommitdiff
path: root/src/vdbeblob.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-02-17 22:40:43 +0000
committerdrh <drh@noemail.net>2014-02-17 22:40:43 +0000
commit688852ab15b7d9f6a3c1f113f25f3c72bcfe3856 (patch)
treef41cf99114a093e94817db1e6e7e42d3ac031f4d /src/vdbeblob.c
parent8be09304b79dd5a2d5f53ca00b01ba9fcf81f21d (diff)
downloadsqlite-688852ab15b7d9f6a3c1f113f25f3c72bcfe3856.tar.gz
sqlite-688852ab15b7d9f6a3c1f113f25f3c72bcfe3856.zip
Add logic to do test coverage measurements on the VDBE code.
FossilOrigin-Name: ce184c7bb16988641d37c908d9b3042456d4be3d
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 0fbc1ad47..4b34f2c29 100644
--- a/src/vdbeblob.c
+++ b/src/vdbeblob.c
@@ -133,14 +133,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 */
@@ -265,7 +264,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);