Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org, Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] sql: update ptr to VDBE after its creation in sql_txn
Date: Tue, 16 Apr 2019 17:35:35 +0300	[thread overview]
Message-ID: <bb0de5c3-e6e5-528b-807d-7e5a901e0105@tarantool.org> (raw)
In-Reply-To: <20190415232522.10188-1-korablev@tarantool.org>

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.
"""

  reply	other threads:[~2019-04-16 14:35 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 ` Vladislav Shpilevoy [this message]
2019-04-18 19:20   ` [tarantool-patches] " n.pettik
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=bb0de5c3-e6e5-528b-807d-7e5a901e0105@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.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