[tarantool-patches] Re: [PATCH] sql: update ptr to VDBE after its creation in sql_txn

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Apr 16 17:35:35 MSK 2019


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




More information about the Tarantool-patches mailing list