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.
Showing
- extra/mkopcodeh.sh 0 additions, 1 deletionextra/mkopcodeh.sh
- src/box/sql/build.c 14 additions, 37 deletionssrc/box/sql/build.c
- src/box/sql/main.c 1 addition, 2 deletionssrc/box/sql/main.c
- src/box/sql/parse.y 4 additions, 7 deletionssrc/box/sql/parse.y
- src/box/sql/sqliteInt.h 28 additions, 3 deletionssrc/box/sql/sqliteInt.h
- src/box/sql/vdbe.c 66 additions, 64 deletionssrc/box/sql/vdbe.c
- src/box/sql/vdbeInt.h 2 additions, 1 deletionsrc/box/sql/vdbeInt.h
- src/box/sql/vdbeapi.c 2 additions, 3 deletionssrc/box/sql/vdbeapi.c
- src/box/sql/vdbeaux.c 13 additions, 15 deletionssrc/box/sql/vdbeaux.c
- test/sql-tap/index1.test.lua 1 addition, 1 deletiontest/sql-tap/index1.test.lua
Loading
Please register or sign in to comment