[patches] [PATCH 2/3] sql: remove extra key copy from cursor routine

Alex Khatskevich avkhatskevich at tarantool.org
Tue Feb 13 11:02:49 MSK 2018


But, as I understand, the point of this commit is that cursor key is 
duty of caller of

the cursor_seek function. So, let the caller do all cursor business than.


On 12.02.2018 20:00, n.pettik wrote:
> Not quite. They are still required when cursor_seek() routine is 
> called via first()/last() functions.
>
>> On 12 Feb 2018, at 19:20, Alex Khatskevich 
>> <avkhatskevich at tarantool.org <mailto:avkhatskevich at tarantool.org>> wrote:
>> After your change, there is no need in key and key_end attributes any 
>> more.
>> They are only confuse it's user.
>> Am I right?
>>> -/* Copy key if necessary. */
>>> -if (key_size != 0) {
>>> -memcpy(c->key, key, key_end - key);
>>> -key_end = c->key + (key_end - key);
>>> -key = c->key;
>>> -}
>>> -
>>> struct space *space;
>>> struct index *index;
>>> uint32_t space_id = SQLITE_PAGENO_TO_SPACEID(pCur->pgnoRoot);
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20180213/46f61ef9/attachment.html>


More information about the Tarantool-patches mailing list