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 C375E6EC5D; Fri, 9 Apr 2021 19:51:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C375E6EC5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617987081; bh=pZVPPxxYjoNy3i6WHtKwrDKhKNsVvg7gsRxzTccz5Ek=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=wDJ68NU7PR+5QO6vmOGgsobohZmwQSws7tk0gOLstZd20Uply9C/2IGPjhZqgGfSi 3BShByYdJT0Pw6D/atnqiUSqOuR7VecbQmHeNM3Itq1rpnR7ZY0cMesytu9xLOd5Bv eK/xiOIPIXX7C5t2CHeH5ltpzAY6XIYo85VP+izY= Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [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 5B78C6EC5D for ; Fri, 9 Apr 2021 19:51:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5B78C6EC5D Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1lUuLn-0005xm-Dh; Fri, 09 Apr 2021 19:51:19 +0300 To: v.shpilevoy@tarantool.org, tsafin@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Fri, 9 Apr 2021 19:51:19 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480257C85EA0BB7A95D0F00AE41BB9A5343182A05F538085040B4B256EFC2C43B2507EEA5BA208C9A22A41BCF6F37E8103F28095F0CBC88819D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE76ABD3380F320B62CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371ECA800C705ED7E68638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B26C92B5ACE85C1D93DB933A54A16DC1D589428004B1FE94FDD2E47CDBA5A96583C09775C1D3CA48CF4964A708C60C975A117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE70F3DDF2BBF19B93A9FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA73A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735C6EABA9B74D0DA47B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CD0035DD76F8A8A4FFC86C3BACC8315C00F925F045DEF43549C2B6934AE262D3EE7EAB7254005DCEDB7D9652AEFDB19A31E0A4E2319210D9B64D260DF9561598F01A9E91200F654B0279E343DB675BB2F8E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A5970F8A4685C8ABB859D55548AD41C1E4FD39CDA46F4C5338F8FF4DE138D285CBDA8E37D9BE0CB91D7E09C32AA3244CE855A0A83C6F605B5F73CD9D76CC8FAAC86C126E7119A0FEFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXj5Lj0u+HExrC1c45pcIjTM X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822D1B78CB78F12F9D4513008D998CC911983D72C36FC87018B9F80AB2734326CD2FB559BB5D741EB96352A0ABBE4FDA4210A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH v5 00/52] Move mem-related functions to mem.c/mem.h 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-set moves all MEM-related functions to mem.c and mem.h. This is done to encapsulate struct MEM whicl allows us to simplify addition of new field types. https://github.com/tarantool/tarantool/issues/5818 https://github.com/tarantool/tarantool/tree/imeevma/gh-5818-encapsulate-mem-type-checking-and-changing Changes in v5: - Review fixes. Changes in v4: - Patch-set was completely reworked. Changes in v3: - Inlined most of the introduced functions to improve performance. - Some other fixes in code to improve performance. Changes in v2: - Squashed almost all patches. - Review fixes. Mergen Imeev (52): sql: enhance vdbe_decode_msgpack_into_mem() sql: disable unused code in sql/analyze.c sql: disable unused code in sql/legacy.c sql: remove NULL-termination in OP_ResultRow sql: move MEM-related functions to mem.c/mem.h sql: refactor port_vdbemem_*() functions sql: remove unused MEM-related functions sql: disable unused code in sql/vdbemem.c sql: introduce mem_str() sql: introduce mem_create() sql: introduce mem_destroy() sql: introduce mem_is_*() functions() sql: introduce mem_copy() sql: introduce mem_copy_as_ephemeral() sql: rework mem_move() sql: rework vdbe_decode_msgpack_into_mem() sql: remove sql_column_to_messagepack() sql: introduce mem_concat() sql: introduce arithmetic operations for MEM sql: introduce mem_compare() sql: introduce bitwise operations for MEM sql: Initialize MEM in sqlVdbeAllocUnpackedRecord() sql: introduce mem_set_null() sql: introduce mem_set_int() sql: introduce mem_set_uint() sql: move mem_set_bool() and mem_set_double() sql: introduce mem_set_str_*() functions sql: introduce mem_copy_str() and mem_copy_str0() sql: introduce mem_set_bin_*() functions sql: introduce mem_copy_bin() sql: introduce mem_set_zerobin() sql: introduce mem_set_*() for map and array sql: introduce mem_set_invalid() sql: refactor mem_set_ptr() sql: introduce mem_set_frame() sql: introduce mem_set_agg() sql: introduce mem_set_null_clear() sql: move MEM flags to mem.c sql: introduce mem_to_int*() functions sql: introduce mem_to_double() sql: introduce mem_to_number() sql: introduce mem_to_str() and mem_to_str0() sql: introduce mem_cast_explicit() sql: introduce mem_cast_implicit() sql: introduce mem_get_int() sql: introduce mem_get_uint() sql: introduce mem_get_double() sql: introduce mem_get_bool() sql: introduce mem_get_str0() and mem_as_str0() sql: introduce mem_get_bin() sql: introduce mem_get_bytes_len() sql: introduce mem_get_agg() src/box/CMakeLists.txt | 1 + src/box/execute.c | 130 +- src/box/sql.c | 96 +- src/box/sql.h | 8 - src/box/sql/analyze.c | 82 +- src/box/sql/build.c | 1 + src/box/sql/func.c | 581 ++----- src/box/sql/insert.c | 1 + src/box/sql/legacy.c | 4 + src/box/sql/main.c | 1 + src/box/sql/mem.c | 3176 +++++++++++++++++++++++++++++++++++++++ src/box/sql/mem.h | 751 +++++++++ src/box/sql/pragma.c | 1 + src/box/sql/printf.c | 13 +- src/box/sql/select.c | 3 +- src/box/sql/sqlInt.h | 153 +- src/box/sql/trigger.c | 1 + src/box/sql/vdbe.c | 1301 ++++------------ src/box/sql/vdbe.h | 1 - src/box/sql/vdbeInt.h | 313 +--- src/box/sql/vdbeapi.c | 432 ++---- src/box/sql/vdbeaux.c | 632 +------- src/box/sql/vdbemem.c | 1329 +--------------- src/box/sql/vdbesort.c | 9 +- src/box/sql/vdbetrace.c | 35 +- src/box/sql/where.c | 1 + src/box/sql/whereexpr.c | 6 +- 27 files changed, 4667 insertions(+), 4395 deletions(-) create mode 100644 src/box/sql/mem.c create mode 100644 src/box/sql/mem.h -- 2.25.1