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 B3B4E6DB05; Fri, 1 Oct 2021 10:47:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B3B4E6DB05 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1633074469; bh=76DbiwVM1rxs5ZFCYdXje1cl+shNm1oiXCawRAFNyK0=; h=To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=f8sKDEitjHHXUbS9rTNKIAMYT3UGR4A1Jzad3pEkjCC1J9yG/9VLLh3tGuBClvDif lGxKVMXD2Tkk2zIrOSp/9HqSZ0zdpTb89Y4zGjeZ0SuroeFTLdTSdlqcFdzdZg4O/Q 9oaxOnsAJqAgzrN0TS7ENmoZt79ryTjZUU0GB+lk= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 B257F6FF9D for ; Fri, 1 Oct 2021 10:43:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B257F6FF9D Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mWDCX-00059z-W5; Fri, 01 Oct 2021 10:43:26 +0300 To: v.shpilevoy@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Fri, 1 Oct 2021 10:43:25 +0300 Message-Id: <5e28f3760ab8e17e8dc35a6a6a48530120d69379.1633073760.git.imeevma@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD96A58C36AA2E9964976B67DC8394C8DAB0EDC1900E6C7EF8D182A05F53808504059DB01C0DB2E75926333EB490857404073FB07E3F56A1E5E6E4CC8925966BD1A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DECE8D0A5E25C0FCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375D8840FA58F505298638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D82A536544626E9BE44008761740724DDC117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCC908CD1B87A134A2A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520140C956E756FBB7AF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BDC0F6C5B2EEF3D0C75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CBBB17C150BCA6793218DA59EC82158CB8FAA9288AFB7C77D9C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF783E2B6F79C23BED699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F1257DC9690AEBA14D37A92777E1B7DE92F62680DCDBC73ACD158F45ECAFBE17DC871FE47C0ED24A1D7E09C32AA3244CD154CE8870B3B314B9642AEAE2E3225B05AB220A9D022EBC729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojJNmX3owDPmGTTMIjjIt1Ag== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D314230ACE7ABC52B36770ABD4CC7F5FF83D72C36FC87018B9F80AB2734326CD2FB559BB5D741EB96352A0ABBE4FDA4210A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH v3 14/15] sql: remove MEM_TYPE_AGG 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: Mergen Imeev via Tarantool-patches Reply-To: imeevma@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This patch removed MEM_TYPE_AGG, which is no longer used due to recent changes. Part of #4145 --- src/box/sql/mem.c | 25 ------------------------- src/box/sql/mem.h | 9 +-------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c index e59935672..3af770f48 100644 --- a/src/box/sql/mem.c +++ b/src/box/sql/mem.c @@ -605,22 +605,6 @@ mem_set_frame(struct Mem *mem, struct VdbeFrame *frame) mem->u.pFrame = frame; } -int -mem_set_agg(struct Mem *mem, struct func *func, int size) -{ - mem_clear(mem); - if (size <= 0) - return 0; - if (sqlVdbeMemGrow(mem, size, 0) != 0) - return -1; - memset(mem->z, 0, size); - mem->n = size; - mem->type = MEM_TYPE_AGG; - assert(mem->flags == 0); - mem->u.func = func; - return 0; -} - void mem_set_null_clear(struct Mem *mem) { @@ -1884,15 +1868,6 @@ mem_len(const struct Mem *mem, uint32_t *len) return 0; } -int -mem_get_agg(const struct Mem *mem, void **accum) -{ - if (mem->type != MEM_TYPE_AGG) - return -1; - *accum = mem->z; - return 0; -} - int mem_copy(struct Mem *to, const struct Mem *from) { diff --git a/src/box/sql/mem.h b/src/box/sql/mem.h index c0993e573..9395f3224 100644 --- a/src/box/sql/mem.h +++ b/src/box/sql/mem.h @@ -54,7 +54,6 @@ enum mem_type { MEM_TYPE_INVALID = 1 << 11, MEM_TYPE_FRAME = 1 << 12, MEM_TYPE_PTR = 1 << 13, - MEM_TYPE_AGG = 1 << 14, }; /* @@ -187,12 +186,6 @@ mem_is_array(const struct Mem *mem) return mem->type == MEM_TYPE_ARRAY; } -static inline bool -mem_is_agg(const struct Mem *mem) -{ - return mem->type == MEM_TYPE_AGG; -} - static inline bool mem_is_bytes(const struct Mem *mem) { @@ -967,7 +960,7 @@ int sqlVdbeMemTooBig(Mem *); * that needs to be deallocated to avoid a leak. */ #define VdbeMemDynamic(X) (((X)->flags & MEM_Dyn) != 0 ||\ - ((X)->type & (MEM_TYPE_AGG | MEM_TYPE_FRAME)) != 0) + ((X)->type & MEM_TYPE_FRAME) != 0) /** * Perform comparison of two tuples: unpacked (key1) and packed (key2) -- 2.25.1