Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v2 4/4] sql: remove OP_LoadPtr
Date: Tue, 10 Jul 2018 21:34:57 +0300	[thread overview]
Message-ID: <450C4EA0-0803-4298-A3D4-D80A97145B66@tarantool.org> (raw)
In-Reply-To: <8e1537ec82992142f31fe561102fdbce690d1754.1531242355.git.kshcherbatov@tarantool.org>


> @@ -2969,12 +2964,9 @@ sql_create_index(struct Parse *parse, struct Token *token,
> 			goto exit_create_index;
> 
> 		sql_set_multi_write(parse, true);
> -
> -
> -		sqlite3VdbeAddOp2(v, OP_SIDtoPtr, BOX_INDEX_ID,
> -				  index_space_ptr_reg);
> -		sqlite3VdbeAddOp4Int(v, OP_OpenWrite, iCursor, 0,
> -				     index_space_ptr_reg, 6);
> +		sqlite3VdbeAddOp4(v, OP_OpenWrite, iCursor, 0, 0,
> +				  (void *)space_by_id(BOX_INDEX_ID),
> +				  P4_SPACEPTR);
> 		sqlite3VdbeChangeP5(v, OPFLAG_SEEKEQ);

Wait, AFAIK SIDtoPtr was used deliberately taking into consideration
the fact that DDL may change ptr to space. So conversion id -> space ptr
is delayed until vdbe execution (right before cursor opening). Am I wrong?

  reply	other threads:[~2018-07-10 18:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10 17:08 [tarantool-patches] [PATCH v2 0/4] sql: get rid off sqlite3NestedParse Kirill Shcherbatov
2018-07-10 17:08 ` [tarantool-patches] [PATCH v2 1/4] sql: get rid off sqlite3NestedParse in clean stats Kirill Shcherbatov
2018-07-10 17:52   ` [tarantool-patches] " n.pettik
2018-07-11  7:22     ` Kirill Shcherbatov
2018-07-11 12:19       ` n.pettik
2018-07-11 12:23         ` Kirill Shcherbatov
2018-07-11 13:16           ` n.pettik
2018-07-10 17:08 ` [tarantool-patches] [PATCH v2 2/4] sql: remove usless sqlite3NestedParse function Kirill Shcherbatov
2018-07-10 18:22   ` [tarantool-patches] " n.pettik
2018-07-11  7:22     ` Kirill Shcherbatov
2018-07-10 17:08 ` [tarantool-patches] [PATCH v2 3/4] sql: refactor vdbe_emit_open_cursor calls Kirill Shcherbatov
2018-07-10 18:22   ` [tarantool-patches] " n.pettik
2018-07-11  7:22     ` Kirill Shcherbatov
2018-07-10 17:08 ` [tarantool-patches] [PATCH v2 4/4] sql: remove OP_LoadPtr Kirill Shcherbatov
2018-07-10 18:34   ` n.pettik [this message]
2018-07-10 20:23     ` [tarantool-patches] " Vladislav Shpilevoy
2018-07-10 20:34       ` n.pettik
2018-07-11 13:45 ` [tarantool-patches] Re: [PATCH v2 0/4] sql: get rid off sqlite3NestedParse Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=450C4EA0-0803-4298-A3D4-D80A97145B66@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='[tarantool-patches] Re: [PATCH v2 4/4] sql: remove OP_LoadPtr' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox