Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: "n.pettik" <korablev@tarantool.org>,
	tarantool-patches@freelists.org,
	Kirill Yukhin <kyukhin@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] sql: update ptr to VDBE after its creation in sql_txn
Date: Thu, 18 Apr 2019 23:06:47 +0300	[thread overview]
Message-ID: <b69aa27a-4e1b-965c-27c7-5d619f3c9a9f@tarantool.org> (raw)
In-Reply-To: <A3C99FF7-E555-4055-B414-0F5B25A98DA1@tarantool.org>



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.

  reply	other threads:[~2019-04-18 20:06 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
2019-04-18 20:06     ` Vladislav Shpilevoy [this message]
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=b69aa27a-4e1b-965c-27c7-5d619f3c9a9f@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=kyukhin@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