From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2644224E44 for ; Tue, 10 Jul 2018 14:35:00 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vqzDqmLk8TeT for ; Tue, 10 Jul 2018 14:35:00 -0400 (EDT) Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id D81FB1FED3 for ; Tue, 10 Jul 2018 14:34:59 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [tarantool-patches] Re: [PATCH v2 4/4] sql: remove OP_LoadPtr From: "n.pettik" In-Reply-To: <8e1537ec82992142f31fe561102fdbce690d1754.1531242355.git.kshcherbatov@tarantool.org> Date: Tue, 10 Jul 2018 21:34:57 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <450C4EA0-0803-4298-A3D4-D80A97145B66@tarantool.org> References: <8e1537ec82992142f31fe561102fdbce690d1754.1531242355.git.kshcherbatov@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy > @@ -2969,12 +2964,9 @@ sql_create_index(struct Parse *parse, struct = Token *token, > goto exit_create_index; >=20 > 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?=