SQLite Forum

Recover Database
Login
You will note that if there is no transaction in progress and you commence the transaction with a `SAVEPOINT name` command, then you must end the transaction with `RELEASE name` (or the equivalent `COMMIT` or `END`), even if you have done a `ROLLBACK TO name` because `ROLLBACK TO` does not release the transaction.

A transaction which is started with a `BEGIN` must be terminated with either a `COMMIT`, `END`, or `ROLLBACK` notwithstanding that all savepoint's in the transaction have been `RELEASE`d.

That is:

```
SAVEPOINT a;
INSERT ...
RELEASE a;
```

is equivalent to:

```
BEGIN;
INSERT ...
COMMIT;
```

is equivalent to:

```
SAVEPOINT a;
INSERT ...
COMMIT;
```