[tarantool-patches] Re: [tarantool-patches] Re: [PATCH] sql: remove unnecessary MakeRecord opcodes

Bulat Niatshin niatshin at tarantool.org
Fri Apr 13 14:35:35 MSK 2018


Branch:
https://github.com/tarantool/tarantool/tree/bn/gh-3317-remove-makerecord

Issue:
https://github.com/tarantool/tarantool/issues/3317

>Среда, 11 апреля 2018, 22:32 +03:00 от n.pettik <korablev at tarantool.org>:
>
>Hello. Only minor remark concerning commit message.
>Rephrase it little bit, please. Lets mention, that you are saying about
>bytecode which is generated to process constraint checks.
>
>> On 4 Apr 2018, at 15:38, Bulat Niatshin < niatshin at tarantool.org > wrote:
>> 
>> OP_MakeRecord creates a record from a given range of registers
>> and stores that record in a specified register.
>
>This is obvious and can be dropped.

Done, see new commit message below.

>
>> But now even
>> secondary indexes with non-default ON CONFLICT clause doesn't
>> need it,
>
>Good place to explain why.

Done, new commit message with a clearer explanation:

OP_MakeRecord in INSERT/UPDATE query is required for making
insertion into Tarantool and for checking constraints with
ON CONFLICT clause. There was one OP_MakeRecord for each
constraint with ON CONFLICT, and each constraint was checked by
VDBE. But now some constraints with error actions like ABORT can
be handled by Tarantool facilities (without emitting bytecode) and
therefore MakeRecord for that index would be unnecessary if it is
not a primary key index (in that case MakeRecord is also needed
for OP_IdxInsert). This patch contains a fix, which removes
unnecessary MakeRecord opcodes from INSERT/UPDATE VDBE listings.


More information about the Tarantool-patches mailing list