SQLite VDBE opcode

AutoCommit

Set the database auto-commit flag to P1 (1 or 0).

An example

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

BEGIN
addropcodep1p2p3p4p5
0Init0300
1AutoCommit0000
2Halt0000
3Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Goto, Halt, Init.

What the SQLite documentation says

Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll back any currently active btree transactions. If there are any active VMs (apart from this one), then a ROLLBACK fails. A COMMIT fails if there are active writing VMs or active VMs that use shared cache.

This instruction causes the VM to halt.

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.

← And · BeginSubrtn →