[tarantool-patches] Re: [PATCH] sql: xfer optimization issue

Hollow111 hollow653 at gmail.com
Fri May 4 15:54:30 MSK 2018


> @@ -1737,8 +1744,10 @@ xferOptimization(Parse * pParse,       /* Parser
context */
>       if (onError == ON_CONFLICT_ACTION_DEFAULT) {
>               if (pDest->iPKey >= 0)
>                       onError = pDest->keyConf;
> -             if (onError == ON_CONFLICT_ACTION_DEFAULT)
> +             if (onError == ON_CONFLICT_ACTION_DEFAULT) {
>                       onError = ON_CONFLICT_ACTION_ABORT;
> +                     confl_action_default = 1;

Why do you need this variable at all? I mean, DEFAULT always
is an alias to ABORT, isn’t it?

Yes, it is, but there's a little difference between directly specified
ABORT for an
insert stmt (INSERT OR ABORT) and just INSERT without any specified error
action
(ABORT specified by the internals). When you directly specify it ABORT is a
higher priority
action than in case there's a column with REPLACE error action. Thus we can
even insert
not in the empty destination table.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20180504/fb99dcac/attachment.html>


More information about the Tarantool-patches mailing list