From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH 3/4] sql: allow SAVEPOINT statement outside transaction
Date: Sat, 5 May 2018 22:15:06 +0300 [thread overview]
Message-ID: <EE3B54BC-471E-46E3-94A1-6532D8DAFC5C@tarantool.org> (raw)
In-Reply-To: <bc9aa5d6-5733-67d6-c69e-82e8d19343e6@tarantool.org>
> 1. Lets use diag_set(ClientError, ER_SAVEPOINT_NO_TRANSACTION) and return TARANTOOL_ERROR.
> It must behave like box.savepoint.
Ok:
@@ -2869,9 +2869,8 @@ case OP_Savepoint: {
if (psql_txn == NULL) {
assert(!box_txn());
- sqlite3VdbeError(p, "cannot process savepoint: "
- "there is no active transaction");
- rc = SQLITE_ERROR;
+ diag_set(ClientError, ER_SAVEPOINT_NO_TRANSACTION);
+ rc = SQL_TARANTOOL_ERROR;
>> diff --git a/test/sql/gh-3313-savepoints-outside-txn.result b/test/sql/gh-3313-savepoints-outside-txn.result
>> new file mode 100644
>> index 000000000..702d3e815
>> --- /dev/null
>> +++ b/test/sql/gh-3313-savepoints-outside-txn.result
>> @@ -0,0 +1,32 @@
>> +test_run = require('test_run').new()
>> +---
>> +...
>> +test_run:cmd("setopt delimiter ';'")
>
> 2. Why do you need here a special delimiter? Your test does not
> contain multi-line statements.
Sorry, it is garbage after copying files. Removed.
>> +---
>> +- true
>> +...
>> +-- These tests check that SQL savepoints properly work outside
>> +-- transactions as well as inside transactions started in Lua.
>> +--
>> +-- box.cfg()
>
> 3. Garbage comment.
Removed.
Also, taking into consideration comment from review of last patch,
I have renamed test file and merge tests from both tickets.
next prev parent reply other threads:[~2018-05-05 19:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 18:49 [tarantool-patches] [PATCH 0/4] Rework SQL transaction processing Nikita Pettik
2018-05-03 18:49 ` [tarantool-patches] [PATCH 1/4] sql: remove OP_AutoCommit opcode Nikita Pettik
2018-05-04 14:12 ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-05 19:14 ` n.pettik
2018-05-03 18:49 ` [tarantool-patches] [PATCH 2/4] sql: allow transitive Lua <-> SQL transactions Nikita Pettik
2018-05-04 14:12 ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-05 19:14 ` n.pettik
2018-05-03 18:49 ` [tarantool-patches] [PATCH 3/4] sql: allow SAVEPOINT statement outside transaction Nikita Pettik
2018-05-04 14:12 ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-05 19:15 ` n.pettik [this message]
2018-05-03 18:49 ` [tarantool-patches] [PATCH 4/4] sql: fix SAVEPOINT RELEASE statement Nikita Pettik
2018-05-04 14:12 ` [tarantool-patches] " Vladislav Shpilevoy
2018-05-05 19:16 ` n.pettik
2018-05-07 13:31 ` [tarantool-patches] Re: [PATCH 0/4] Rework SQL transaction processing Vladislav Shpilevoy
2018-05-11 7:17 ` Kirill Yukhin
2018-05-11 10:08 ` 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=EE3B54BC-471E-46E3-94A1-6532D8DAFC5C@tarantool.org \
--to=korablev@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.org \
--subject='[tarantool-patches] Re: [PATCH 3/4] sql: allow SAVEPOINT statement outside transaction' \
/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