Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Nikita Pettik <korablev@tarantool.org>, tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 0/4] Rework SQL transaction processing
Date: Mon, 7 May 2018 16:31:12 +0300	[thread overview]
Message-ID: <18ab40f4-4357-f2bd-9280-1069f936995b@tarantool.org> (raw)
In-Reply-To: <cover.1525368399.git.korablev@tarantool.org>

Hello. Thanks for review fixes! The whole patchset LGTM now.

On 03/05/2018 21:49, Nikita Pettik wrote:
> Branch: https://github.com/tarantool/tarantool/tree/np/rework-sql-transactions
> Issue:
> https://github.com/tarantool/tarantool/issues/3237
> https://github.com/tarantool/tarantool/issues/3313
> https://github.com/tarantool/tarantool/issues/3379
> 
> 
> This patch-set consists of several fixes related to SQL transactions.
> 
> First patch provides slight refactoring of transactions processing
> in SQL: instead of using one opcode OP_AutoCommit for BEGIN, COMMIT and
> ROLLBACK handling during VDBE execution, three different opcodes are
> added. Moreover, redundant switches of auto-commit flag are removed.
> Now, it is set during VDBE creation and can be changed only by BEGIN
> statement or by DML request (since DML must be surrounded in a separate txn).
> 
> Second patch is the main in series and introduces transitive
> transactions between SQL and Lua. To implement this feature,
> deferred FK counter has become attribute of transaction, and
> removed from VDBE.
> 
> Last two patches fix bugs connected with SQL savepoints:
> first one led to assertion fault due to wrong assert condition;
> second one resulted in incorrect processing of RELEASE
> statement due to obsolete SQLite code.
> 
> Nikita Pettik (4):
>    sql: remove OP_AutoCommit opcode
>    sql: allow transitive Lua <-> SQL transactions
>    sql: allow SAVEPOINT statement outside transaction
>    sql: fix SAVEPOINT RELEASE statement
> 
>   src/box/errcode.h                                |   1 +
>   src/box/sql/build.c                              |  51 ++-----
>   src/box/sql/fkey.c                               |  66 +++------
>   src/box/sql/main.c                               |   8 +-
>   src/box/sql/parse.y                              |  11 +-
>   src/box/sql/pragma.c                             |   3 -
>   src/box/sql/sqliteInt.h                          |  33 ++++-
>   src/box/sql/status.c                             |   3 +-
>   src/box/sql/vdbe.c                               | 176 ++++++++++++-----------
>   src/box/sql/vdbeInt.h                            |  29 +---
>   src/box/sql/vdbeapi.c                            |   4 -
>   src/box/sql/vdbeaux.c                            |  83 +++++------
>   src/box/txn.c                                    |  18 ++-
>   src/box/txn.h                                    |  22 ++-
>   test/box/misc.result                             |   1 +
>   test/sql/gh-3313-savepoints-outside-txn.result   |  32 +++++
>   test/sql/gh-3313-savepoints-outside-txn.test.lua |  18 +++
>   test/sql/gh-3379-release-savepoints.result       |  40 ++++++
>   test/sql/gh-3379-release-savepoints.test.lua     |  26 ++++
>   test/sql/transitive-transactions.result          | 124 ++++++++++++++++
>   test/sql/transitive-transactions.test.lua        |  67 +++++++++
>   21 files changed, 555 insertions(+), 261 deletions(-)
>   create mode 100644 test/sql/gh-3313-savepoints-outside-txn.result
>   create mode 100644 test/sql/gh-3313-savepoints-outside-txn.test.lua
>   create mode 100644 test/sql/gh-3379-release-savepoints.result
>   create mode 100644 test/sql/gh-3379-release-savepoints.test.lua
>   create mode 100644 test/sql/transitive-transactions.result
>   create mode 100644 test/sql/transitive-transactions.test.lua
> 

  parent reply	other threads:[~2018-05-07 13:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 18:49 [tarantool-patches] " Nikita Pettik
2018-05-03 18:49 ` [tarantool-patches] [PATCH 1/4] sql: remove OP_AutoCommit opcode Nikita Pettik
2018-05-04 14:12   ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-05 19:14     ` n.pettik
2018-05-03 18:49 ` [tarantool-patches] [PATCH 2/4] sql: allow transitive Lua <-> SQL transactions Nikita Pettik
2018-05-04 14:12   ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-05 19:14     ` n.pettik
2018-05-03 18:49 ` [tarantool-patches] [PATCH 3/4] sql: allow SAVEPOINT statement outside transaction Nikita Pettik
2018-05-04 14:12   ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-05 19:15     ` n.pettik
2018-05-03 18:49 ` [tarantool-patches] [PATCH 4/4] sql: fix SAVEPOINT RELEASE statement Nikita Pettik
2018-05-04 14:12   ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-05 19:16     ` n.pettik
2018-05-07 13:31 ` Vladislav Shpilevoy [this message]
2018-05-11  7:17   ` [tarantool-patches] Re: [PATCH 0/4] Rework SQL transaction processing Kirill Yukhin
2018-05-11 10:08   ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18ab40f4-4357-f2bd-9280-1069f936995b@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH 0/4] Rework SQL transaction processing' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox