Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v2 2/4] sql: account REPLACE as two row changes
Date: Wed, 14 Nov 2018 19:20:36 +0300	[thread overview]
Message-ID: <E1A8CBEA-6970-4861-B86F-44CF5375029C@tarantool.org> (raw)
In-Reply-To: <1cb8f01c-80a8-658a-895f-31649a9e70e8@tarantool.org>

[-- Attachment #1: Type: text/plain, Size: 894 bytes --]


> Thanks for the patch!
> 
> On 13/11/2018 19:11, Nikita Pettik wrote:
>> In our SQL implementation REPLACE acts as DELETE + INSERT, so we should
>> account it as two row changes.
>> Needed for #2181
>> ---
>>  src/box/sql/insert.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)> diff --git a/src/box/sql/insert.c b/src/box/sql/insert.c
>> index fd05c0254..a53568810 100644
>> --- a/src/box/sql/insert.c
>> +++ b/src/box/sql/insert.c
>> @@ -1076,7 +1076,7 @@ process_index:  ;
>>  				sql_triggers_exist(tab, TK_DELETE, NULL, NULL);
>>  			sql_generate_row_delete(parse_context, tab, trigger,
>>  						cursor, idx_key_reg, part_count,
>> -						false,
>> +						true,
>>  						ON_CONFLICT_ACTION_REPLACE,
>>  						ONEPASS_SINGLE, -1);
>>  			sqlite3VdbeResolveLabel(v, skip_index);
> 
> I added a test on the branch and here:

Applied as obvious. Thx.


[-- Attachment #2: Type: text/html, Size: 6781 bytes --]

  reply	other threads:[~2018-11-14 16:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 16:11 [tarantool-patches] [PATCH v2 0/4] Introduce row_count() function Nikita Pettik
2018-11-13 16:11 ` [tarantool-patches] [PATCH v2 1/4] sql: don't increment row count on FK creation within CREATE TABLE Nikita Pettik
2018-11-14 12:32   ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-14 16:20     ` n.pettik
2018-11-13 16:11 ` [tarantool-patches] [PATCH v2 2/4] sql: account REPLACE as two row changes Nikita Pettik
2018-11-14 12:32   ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-14 16:20     ` n.pettik [this message]
2018-11-13 16:11 ` [tarantool-patches] [PATCH v2 3/4] sql: remove total_changes() function Nikita Pettik
2018-11-13 16:11 ` [tarantool-patches] [PATCH v2 4/4] sql: rename changes() to row_count() Nikita Pettik
2018-11-14 12:32   ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-14 16:20     ` n.pettik
2018-11-14 16:43       ` Vladislav Shpilevoy
2018-11-15  5:06 ` [tarantool-patches] Re: [PATCH v2 0/4] Introduce row_count() function 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=E1A8CBEA-6970-4861-B86F-44CF5375029C@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='[tarantool-patches] Re: [PATCH v2 2/4] sql: account REPLACE as two row changes' \
    /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