SQLite VDBE opcode

Savepoint

Open, release or rollback the savepoint named by parameter P4, depending on the value of P1.

An example

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

RELEASE a
addropcodep1p2p3p4p5
0Init0300
1Savepoint100a0
2Halt0000
3Goto0100

Open it in the EXPLAIN visualizer →

Also in this program: Goto, Halt, Init.

What the SQLite documentation says

Open, release or rollback the savepoint named by parameter P4, depending on the value of P1. To open a new savepoint set P1==0 (SAVEPOINT_BEGIN). To release (commit) an existing savepoint set P1==1 (SAVEPOINT_RELEASE). To rollback an existing savepoint set P1==2 (SAVEPOINT_ROLLBACK).

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.

← RowSetTest · SCopy →