<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">вс, 29 июл. 2018 г. в 18:16, 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">On Sun, Jul 29, 2018 at 02:23:30PM +0300, n.pettik wrote:<br>
> >    1. Not actual due to 2, but it would be better to use<br>
> >      `pOp->p5 &= ~OPFLAG_XFER_OPT` to drop just that flag.<br>
> >    2. It is counter-intuitive, IMHO, to change operation flags during<br>
> >       that operation. So, said above, vote to move it to OP_OpenWrite.<br>
> <br>
>    Well, actually moving it to OP_OpenWrite seems to be bad idea.<br>
> <br>
>    Even if code for xFer optimisation is generated, it<br>
> <br>
>    still might not be executed. The only opcode ensuring xFer is<br>
> <br>
>    under processing - OP_RowData.<br>
<br>
We have separate OpenWrite opcodes in xfer and regular insert code. We<br>
open destination space curson always (to determine whether the space is<br>
empty), but we can set the flag when open source space cursor. But this<br>
will forbid to check source space for emptiness in xfer code or will<br>
require to 'workaround' it using two cursors.<br>
<br>
By the way, I observed that the following code is dead:<br>
<br>
>         if (emptySrcTest)<br>
>                 sqlite3VdbeJumpHere(v, emptySrcTest);<br>
<br>
WBR, Alexander Turenko.<br></blockquote><div><br></div><div>I'm not sured if changing p5 in OP_OpenWrite is a good idea since</div><div>1) Even if p5 isn't used while xfer is processed it's reserved and </div><div>there are no free parameters.</div><div>2) Who knows, probably we will need p5 for something in future.</div><div>3) AFAIK OP_OpenWrite is a legacy opcode and probably gonna be</div><div>removed.</div><div>4) For me it's more counter-intuitive to put incrementation in </div><div>opcode that barely related to xfer optimization idea.</div><div>5) Do CPU cycles matter for debugging purpose only global variable? </div></div></div>