From: "n.pettik" <korablev@tarantool.org> To: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: [tarantool-patches] Re: [PATCH] sql: update ptr to VDBE after its creation in sql_txn Date: Thu, 18 Apr 2019 22:20:27 +0300 [thread overview] Message-ID: <A3C99FF7-E555-4055-B414-0F5B25A98DA1@tarantool.org> (raw) In-Reply-To: <bb0de5c3-e6e5-528b-807d-7e5a901e0105@tarantool.org> >> 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. > >> +--- >> +... > > 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. > """ >
next prev parent reply other threads:[~2019-04-18 19:20 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-15 23:25 [tarantool-patches] " Nikita Pettik 2019-04-16 14:35 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 19:20 ` n.pettik [this message] 2019-04-18 20:06 ` Vladislav Shpilevoy 2019-04-25 8:58 ` 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=A3C99FF7-E555-4055-B414-0F5B25A98DA1@tarantool.org \ --to=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='[tarantool-patches] Re: [PATCH] sql: update ptr to VDBE after its creation in sql_txn' \ /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