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 890FE2BDCE for ; Thu, 18 Apr 2019 16:06:51 -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 TyUoUYUu8Fue for ; Thu, 18 Apr 2019 16:06:51 -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 402632BC38 for ; Thu, 18 Apr 2019 16:06:51 -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: Thu, 18 Apr 2019 23:06:47 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit 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: "n.pettik" , tarantool-patches@freelists.org, Kirill Yukhin On 18/04/2019 22:20, n.pettik wrote: > >>> 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. > > As test cases shows - we don’t have tests involving insertions > to auto-increment field within transaction. So, I just wanted to > make sure that savepoints are working as well. If you wan’t, > I can make this test be 2-lines-like. If this test works as well, it is up to you. LGTM anyway.