From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 350E722373 for ; Mon, 7 May 2018 09:31:16 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AHeK4QwklVDw for ; Mon, 7 May 2018 09:31:16 -0400 (EDT) Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id E117F20F2B for ; Mon, 7 May 2018 09:31:15 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 0/4] Rework SQL transaction processing References: From: Vladislav Shpilevoy Message-ID: <18ab40f4-4357-f2bd-9280-1069f936995b@tarantool.org> Date: Mon, 7 May 2018 16:31:12 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Nikita Pettik , tarantool-patches@freelists.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 >