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 DF9492C5D1 for ; Thu, 18 Apr 2019 15:20:30 -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 UozQa8cOmI-e for ; Thu, 18 Apr 2019 15:20:30 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 2C5A32ADA1 for ; Thu, 18 Apr 2019 15:20:30 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: [tarantool-patches] Re: [PATCH] sql: update ptr to VDBE after its creation in sql_txn From: "n.pettik" In-Reply-To: Date: Thu, 18 Apr 2019 22:20:27 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190415232522.10188-1-korablev@tarantool.org> 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 Cc: Vladislav Shpilevoy >> 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(); >=20 > 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=E2=80=99t 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=E2=80=99t, I can make this test be 2-lines-like.=20 >=20 >> +--- >> +... >=20 > 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: >=20 > """ > 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. > """ >=20