Skip to content
Snippets Groups Projects
user avatar
Nikita Pettik authored
In SQLite OP_AutoCommit opcode used to set transaction operation:
BEGIN, ROLLBACK and COMMIT, switching auto-commit flag in VDBE.
As for Tarantool, it is confusing, since there are some differences
between auto-commit modes: 'INSERT ...  VALUES (1), (2), (3)' is one
indivisible operation for SQLite, and three operations in real
auto-commit mode for Tarantool. To simulate SQLite auto-commit mode,
these three insertions are wrapped into one SEPARATE transaction,
which is, in fact, not real autocommit mode.
So, lets add separate explicit opcodes to BEGIN, ROLLBACK and COMMIT
transactions as user's operations. Auto-commit mode is set once at VDBE
creation and can be changed only by implicit opcode OP_TTransaction,
which is added to each DML statement, or by 'BEGIN' SQL statement.
325e2a1d
History
Name Last commit Last update