SQLite VDBE opcode

Init

Programs contain a single instance of this opcode as the very first opcode.

Jumps: P2 is an instruction address. In the listings here, a jump is drawn as an arc and the address is a link.

An example

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

BEGIN
addropcodep1p2p3p4p5
0Init0300
1AutoCommit0000
2Halt0000
3Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: AutoCommit, Goto, Halt.

What the SQLite documentation says

Programs contain a single instance of this opcode as the very first opcode.

If tracing is enabled (by the sqlite3_trace()) interface, then the UTF-8 string contained in P4 is emitted on the trace callback. Or if P4 is blank, use the string returned by sqlite3_sql().

If P2 is not zero, jump to instruction P2.

Increment the value of P1 so that Once opcodes will jump the first time they are evaluated for this run.

If P3 is not zero, then it is an address to jump to if an SQLITE_CORRUPT error is encountered.

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.

← IncrVacuum · InitCoroutine →