From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id E2E9D70358; Wed, 15 Sep 2021 00:22:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E2E9D70358 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1631654562; bh=SQHoLvj5AAj2CqkBqIVohO0i9HnCWkCBkPsmF4YjPMg=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=IgH9uKv16vSBLEWLmwp9u1Czjb7KQ394K4f9KqlTLGR80pm7koaJRFO4F6GsJQCH3 o66iFErZA18CqGRG/+0BSf7QBm6USJnK0hpj/jk6FLLH4s19OvRSg3M3884+HYx54F eFIqFyk7dU0sQlgz115xqGX3/kW6z1wf28+ZjNAU= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A209F70358 for ; Wed, 15 Sep 2021 00:22:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A209F70358 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mQFt1-0006Ek-Th; Wed, 15 Sep 2021 00:22:40 +0300 To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <610b38cc1f01a80faf25a194d157cc3987f28f83.1631289462.git.imeevma@gmail.com> Message-ID: Date: Tue, 14 Sep 2021 23:22:39 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <610b38cc1f01a80faf25a194d157cc3987f28f83.1631289462.git.imeevma@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD91AE02D33A9C88A2F7631404A3C5D35349DE4D58F47F062C400894C459B0CD1B98D98F43DF6EA9EB07A3F2CBACCB31A5F4C7EFB8636A59566B9C4F2611CB3DCF4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE722087ABFAC96EBFEEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B23888C9749F3CAC8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D85FFA57FD5A9C45A6CB75D75B707B0105117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3733B5EC72352B9FA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F6FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6B1CFA6D474D4A6A4089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505233A9F1ACC4CB22357994DF5E89EA554 X-C1DE0DAB: 0D63561A33F958A5C1B61ADAF4A8A63D9FF6D5802DAF5EC105330CE1B434E848D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3468964757141B82E0BB64519C2EC09FFF1DCE7B3D1EBF7FFE5AABBE238ED926D0BD79EC47BAC735771D7E09C32AA3244C07021D74DF3799A606156C1F591C1EB5C86C126E7119A0FE729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj2yA91e2A1g1rbirmSt7y0g== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DA5E9542C31E86F4C07771AE1E369D5DA3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 03/13] sql: move collation to struct sql_context X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for working on this! On 10.09.2021 18:01, imeevma@tarantool.org wrote: > This patch makes it easier to get a collation by a function. You could also store the opcode pointer instead of iOp. But I suspect your main reason is to get rid of the vdbe pointer? If yes, then why? > diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c > index 2ff7ce8f4..12dc9126b 100644 > --- a/src/box/sql/vdbe.c > +++ b/src/box/sql/vdbe.c > @@ -1159,23 +1159,13 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */ > break; > } > > -/* Opcode: CollSeq P1 * * P4 > - * > - * P4 is a pointer to a CollSeq struct. If the next call to a user function > - * or aggregate calls sqlGetFuncCollSeq(), this collation sequence will > - * be returned. This is used by the built-in min(), max() and nullif() > - * functions. > +/* Opcode: SkipLoad P1 * * * * > * > * If P1 is not zero, then it is a register that a subsequent min() or > * max() aggregate will set to true if the current row is not the minimum or > * maximum. The P1 register is initialized to false by this instruction. > - * > - * The interface used by the implementation of the aforementioned functions > - * to retrieve the collation sequence set by this opcode is not available > - * publicly. Only built-in functions have access to this feature. > */ > -case OP_CollSeq: { > - assert(pOp->p4type==P4_COLLSEQ || pOp->p4.pColl == NULL); > +case OP_SkipLoad: { That is a very strange name. Couldn't OP_Bool somehow be reused? Why is this R[p1] = false even needed? > if (pOp->p1) { > mem_set_bool(&aMem[pOp->p1], false); > }