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 E4A0C6EC40; Thu, 23 Sep 2021 01:47:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E4A0C6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632350869; bh=Nn3W7wo6Dg3+RRgWS2J8we/O12qFzxz5wN9NyICaOZA=; 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=yybDCsJO+QKof6VZH21wvWOwJpAtnTCGWd8qA+At855iiQ++SJTw9oySc5YXZ12xt 1eTSsXFaWSvPMo7CimSakkp2Il4R0hdDJPUpdhRkirRKLXyfNoNgqnP6ozQ1+wXVmm YBUDcCFUBgER6mRe+LZ+OPyzWosAZdsJu+8IPSpA= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 15F7E6EC40 for ; Thu, 23 Sep 2021 01:47:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 15F7E6EC40 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1mTB1m-0008KF-Eh; Thu, 23 Sep 2021 01:47:46 +0300 To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <15a8d09b-75db-f250-1377-7be990388f7d@tarantool.org> Date: Thu, 23 Sep 2021 00:47:45 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91AE02D33A9C88A2F6A36F53BB3AD52253F2DCAAB31849A6F00894C459B0CD1B94755836CCABD6F5E8B3F88850B467BA6DC443D2BA0B873E507FF99C5E22D976D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D6964C9E324ABA58EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A85D247F7B1E5F958638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D82C92324FF6E84856EE4B93E04918D875117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC47272755C61AA17BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B1593CA6EC85F86DF04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505146249CD04DF8AE91FED4172A2880A6C X-C1DE0DAB: 0D63561A33F958A5B9DA9FC7DA8A233107B8FF5FB8D76B2C3F2822550E0B8FF3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA759D2A03B9C34326B3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C264B329661203DADC4D9114D3C970EAD5721592EDA562094197F59EE97AC95E6E37C6E68671542B1D7E09C32AA3244C7D2403D4756D2D201670C7223394E300C86C126E7119A0FE729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojYVPXnTWjYf5+HoBVlPKSWg== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D22EF246BD0408BA9D80FFFF3DBFDF2B63841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 06/15] sql: remove sql_vdbemem_finalize() 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 the fixes! > diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c > index a9011fc63..fb304d868 100644 > --- a/src/box/sql/mem.c > +++ b/src/box/sql/mem.c > @@ -217,11 +217,7 @@ mem_create(struct Mem *mem) > static inline void > mem_clear(struct Mem *mem) > { > - if ((mem->type & (MEM_TYPE_AGG | MEM_TYPE_FRAME)) != 0 || > - (mem->flags & MEM_Dyn) != 0) { > - if (mem->type == MEM_TYPE_AGG) > - sql_vdbemem_finalize(mem, mem->u.func); > - assert(mem->type != MEM_TYPE_AGG); > + if ((mem->type & MEM_TYPE_FRAME) != 0 || (mem->flags & MEM_Dyn) != 0) { It is a single type now, you can use type == MEM_TYPE_FRAME. Also a few lines below you again check both the conditions: if ((mem->flags & MEM_Dyn) != 0) { ... } else if (mem->type == MEM_TYPE_FRAME) { ... } The 'else' don't need to check type == FRAME. It is true anyway if this was true: if ((mem->type & MEM_TYPE_FRAME) != 0 || (mem->flags & MEM_Dyn) != 0) and "(mem->flags & MEM_Dyn) != 0" wasn't.