SQLite VDBE opcode

VBegin

P4 may be a pointer to an sqlite3_vtab structure.

An example

4 of the 178 statements we compiled against the sample database use VBegin. This is the one with the shortest program; the rows that use VBegin are highlighted.

INSERT INTO lyrics VALUES (1, 'la la la')
addropcodep1p2p3p4p5
0Init0700
1Integer1300
2String8040la la la0
3Null0100
4Null0200
5VUpdate171vtab:52B1502
6Halt0000
7Transaction01101
8VBegin000vtab:52B1500
9Null0500
10Null0600
11Null0700
12Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Goto, Halt, Init, Integer, Null, String8, Transaction, VUpdate.

What the SQLite documentation says

P4 may be a pointer to an sqlite3_vtab structure. If so, call the xBegin method for that table.

Also, whether or not P4 is set, check that this is not being called from within a callback to a virtual table xSync() method. If it is, the error code will be set to SQLITE_LOCKED.

From sqlite.org's list of opcodes for SQLite 3.54.1, in the public domain. Opcodes are not a stable interface and change between releases.

← Variable · VCheck →