<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">пн, 9 июл. 2018 г. в 18:50, Alexander Turenko <<a href="mailto:alexander.turenko@tarantool.org">alexander.turenko@tarantool.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nikita!<br>
<br>
Please, consider comments below.<br>
<br>
WBR, Alexander Turenko.<br>
<br>
> +test:do_execsql_test(<br>
> +       "xfer-oprimization-1.8",<br>
> ...<br>
> +test:do_execsql_test(<br>
> +       "xfer-oprimization-1.10",<br>
> ...<br>
> +test:do_execsql_test(<br>
> +       "xfer-oprimization-1.12",<br>
> ...<br>
> +test:do_execsql_test(<br>
> +       "xfer-oprimization-1.16",<br>
> +test:do_execsql_test(<br>
> +       "xfer-oprimization-1.18",<br>
<br>
oprimization -> optimization<br></blockquote><div><br></div><div>Is already fixed. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It seems that review questions from the last Nikita email in the thread<br>
was not fixed or answered (at least some of them).<br>
<br>
> +       sqlite3VdbeAddOp3(v, OP_OpenWrite, iSrc,<br>
> +                         pSrc->tnum, space_ptr_reg);<br>
<br>
Why do you open source space for write?<br>
<br></blockquote><div><br></div><div>I changed it to 'vdbe_emit_open_cursor' which now is used everywhere for both reading and writing (internally it uses 'OP_OpenWrite') </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How your changes to xferCompatibleIndex and empty check enabling<br>
condition is motivated? It is hard to understand it without more<br>
detailed description.<br>
<br></blockquote><div><br></div><div>We open cursors on PK for both tables, additional check that we have opened 'em on PK isn't redundunt.</div><div>What's about empty check enabling: I only want to add some cases where we don't demand empty destination table for xferOptimization to be used. Thus it will be used a little bit more frequently (it's faster than inserting non-raw data for about 13%).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
EOF.<br>
<br>
On Thu, Jun 28, 2018 at 01:18:39PM +0300, Alexander Turenko wrote:<br>
> On Fri, May 04, 2018 at 12:54:30PM +0000, Hollow111 wrote:<br>
> >    > @@ -1737,8 +1744,10 @@ xferOptimization(Parse * pParse,       /*<br>
> >    Parser context */<br>
> >    >       if (onError == ON_CONFLICT_ACTION_DEFAULT) {<br>
> >    >               if (pDest->iPKey >= 0)<br>
> >    >                       onError = pDest->keyConf;<br>
> >    > -             if (onError == ON_CONFLICT_ACTION_DEFAULT)<br>
> >    > +             if (onError == ON_CONFLICT_ACTION_DEFAULT) {<br>
> >    >                       onError = ON_CONFLICT_ACTION_ABORT;<br>
> >    > +                     confl_action_default = 1;<br>
> >    Why do you need this variable at all? I mean, DEFAULT always<br>
> >    is an alias to ABORT, isn’t it?<br>
> >    Yes, it is, but there's a little difference between directly specified<br>
> >    ABORT for an<br>
> >    insert stmt (INSERT OR ABORT) and just INSERT without any specified<br>
> >    error action<br>
> >    (ABORT specified by the internals). When you directly specify it ABORT<br>
> >    is a higher priority<br>
> >    action than in case there's a column with REPLACE error action. Thus we<br>
> >    can even insert<br>
> >    not in the empty destination table.<br>
> <br>
> If an user asks for ABORT explicitly we should make abort, I think.<br>
> <br>
> As I understood the extra variable appears due to the fact than we can<br>
> have per-column conflict clauses in CREATE TABLE and per-table clause<br>
> with INSERT OR ABORT. The latter should have precedence, I think.<br>
> <br>
> I don't sure whether something (behaviour? code?) should be different<br>
> from SQLite here in light of #2963 changes. Kirill, Nikita, can you<br>
> comment, please?<br>
> <br>
> WBR, Alexander Turenko.<br>
> <br>
</blockquote></div></div>