Skip to content
Snippets Groups Projects
Commit 325e2a1d authored by Nikita Pettik's avatar Nikita Pettik Committed by Kirill Yukhin
Browse files

sql: remove OP_AutoCommit opcode

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.
parent d02286c2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment