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 8E67B2BB29 for ; Tue, 16 Apr 2019 10:35:37 -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 wAvYzakz5OGs for ; Tue, 16 Apr 2019 10:35:37 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 2AD122813E for ; Tue, 16 Apr 2019 10:35:37 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH] sql: update ptr to VDBE after its creation in sql_txn References: <20190415232522.10188-1-korablev@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Tue, 16 Apr 2019 17:35:35 +0300 MIME-Version: 1.0 In-Reply-To: <20190415232522.10188-1-korablev@tarantool.org> Content-Type: text/plain; charset=utf-8 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: tarantool-patches@freelists.org, Nikita Pettik Thanks for the patch! > diff --git a/test/sql/transitive-transactions.result b/test/sql/transitive-transactions.result > index 883cc00f6..ee9b4218d 100644 > --- a/test/sql/transitive-transactions.result > +++ b/test/sql/transitive-transactions.result > @@ -134,3 +134,31 @@ box.execute('DROP TABLE parent;'); > --- > - row_count: 1 > ... > +-- gh-4157: autoincrement within transaction started in SQL > +-- leads to seagfault. > +-- > +box.execute('CREATE TABLE t (id INT PRIMARY KEY AUTOINCREMENT);'); > +--- > +- row_count: 1 > +... > +box.execute('START TRANSACTION') > +box.execute('INSERT INTO t VALUES (null), (null);') > +box.execute('INSERT INTO t VALUES (null), (null);') > +box.execute('SAVEPOINT sp;') > +box.execute('INSERT INTO t VALUES (null);') > +box.execute('ROLLBACK TO sp;') > +box.execute('INSERT INTO t VALUES (null);') > +box.commit(); > +--- > +... > +box.space.T:select(); > +--- > +- - [1] > + - [2] > + - [3] > + - [4] > + - [6] > +... > +box.space.T:drop(); Why so huge test? I see that you have 4-line test in the issue. Maybe it would be simpler to use it? In the test above savepoints confuse me. > +--- > +... Just in case somebody doubts that Vdbe in txn was necessary and even forced by Kostja (who of course has already forgot it and proposes contradictory things again), I paste here Kostja's answer on the original patchset: """ We're going to do a lot of integration of box and vdbe - triggers, constraints, etc, so I think this patch is on track from architecture point of view as well, we will need to access vdbe from box increasingly more as we progress along with the integration. """