[tarantool-patches] Re: [PATCH v2 2/4] sql: account REPLACE as two row changes
n.pettik
korablev at tarantool.org
Wed Nov 14 19:20:36 MSK 2018
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20181114/9649d3f3/attachment.html>
More information about the Tarantool-patches
mailing list