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 890EE6FC8F; Tue, 23 Mar 2021 12:34:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 890EE6FC8F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1616492080; bh=JsuyhHELjGIzBg8OJTusZLY4H0kcmqoIHnGGNwr734I=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=aWEX8GdIi68LIuOhq8ls4081kWYfu4PIPtQEuqcGAxIYuRLf2ocKp1uKIlw1+4qUi 296zxOI12uqapJfW57OM3Hvwe8eiambctyf6ZInICpYc781pA2rQvQbgUF4XJcc8nc Q8J6Gs+TlOk1vg4Cw9GjCSBCvSswx5Tv4SgueVSg= Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (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 90FD86FC8F for ; Tue, 23 Mar 2021 12:34:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 90FD86FC8F Received: by smtp47.i.mail.ru with esmtpa (envelope-from ) id 1lOdQs-0005vC-Dx; Tue, 23 Mar 2021 12:34:39 +0300 To: v.shpilevoy@tarantool.org, tsafin@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Tue, 23 Mar 2021 12:34:37 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD95D6E7CC48CB1F5F179C48A9DDACBFB6F5347129BC2C9341C182A05F538085040B773B574FB02C2871322F7285AD94D991A9A33F555ECCA9EDA9D852D941C37D4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE75DF2B1F23425CAE5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063748C26B83F2B024408638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95C686AF563A045C75ED23BBD40E9139131FA11CE1773C86182A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE767883B903EA3BAEA9FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3E478A468B35FE767117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CF43445A3F52214074BA3038C0950A5D36C8A9BA7A39EFB766EC990983EF5C0329BA3038C0950A5D36D5E8D9A59859A8B6F917E194115AD12876E601842F6C81A1F004C906525384307823802FF610243DF43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B3BBE47FD9DD3FB59A8DF7F3B2552694A57739F23D657EF2B13377AFFFEAFD26923F8577A6DFFEA7C7D149460FF1CF91893EC92FD9297F6715571747095F342E857739F23D657EF2BD5E8D9A59859A8B6EC71F829093BE88A089D37D7C0E48F6C5571747095F342E857739F23D657EF2B6825BDBE14D8E7024847893F9AA87235E5BFE6E7EFDEDCD789D4C264860C145E X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2BBE337FB72E923155C0AF1600DCBC20B386D740E071D760D4285FB2B3BA30E83 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C686AF563A045C75ED23BBD40E9139131FA11CE1773C861829C2B6934AE262D3EE7EAB7254005DCEDB7D9652AEFDB19A31E0A4E2319210D9B64D260DF9561598F01A9E91200F654B0279E343DB675BB2F8E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349EC559D073CA5B6898F062259FEBD046C08CD75C35F244B07A930EA905AA4C7A3CF87CDE164679A21D7E09C32AA3244C08BDA31C643150470470485069539155F26BFA4C8A6946B8FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXh0z1dnC/bBjC1c45pcIjTM X-Mailru-Sender: 5C3750E245F362008BC1685FEC6306EDC5A2550A85C043E91322F7285AD94D99BA0848438379BFCE5105BD0848736F9966FEC6BF5C9C28D97E07721503EA2E00ED97202A5A4E92BF7402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v4 00/53] 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 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 (53): sql: enchance 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: 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 mem_arithmetic() sql: introduce mem_compare() sql: introduce mem_bitwise() sql: introduce mem_bit_not() sql: Initialize MEM in sqlVdbeAllocUnpackedRecord() sql: introduce mem_set_null() sql: introduce mem_set_integer() sql: introduce mem_set_unsigned() sql: introduce mem_set_boolean() sql: refactor mem_set_double() sql: refactor mem_set_*_string() sql: introduce mem_copy_string() sql: introduce mem_set_*_binary() sql: introduce mem_copy_binary() sql: introduce mem_set_zerobinary() sql: introduce mem_append_to_binary() sql: introduce mem_set_*_map() and mem_set_*_array() sql: introduce mem_set_undefined() sql: introduce mem_set_pointer() sql: introduce mem_set_frame() sql: introduce mem_*_aggregate() sql: introduce mem_set_cleared() sql: move MEM flags to mem.c sql: introduce mem_convert_to_integer() sql: introduce mem_convert_to_double() sql: introduce mem_convert_to_number() sql: introduce mem_convert_to_string() sql: introduce mem_explicit_cast() sql: introduce mem_implicit_cast() sql: introduce mem_get_integer() sql: introduce mem_get_unsigned() sql: introduce mem_get_double() sql: introduce mem_get_boolean() sql: introduce mem_get_string0() sql: introduce mem_get_binary() sql: introduce mem_get_length() 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 | 370 +++-- src/box/sql/insert.c | 1 + src/box/sql/legacy.c | 4 + src/box/sql/main.c | 1 + src/box/sql/mem.c | 2994 +++++++++++++++++++++++++++++++++++++++ src/box/sql/mem.h | 530 +++++++ src/box/sql/pragma.c | 1 + src/box/sql/printf.c | 16 +- src/box/sql/select.c | 3 +- src/box/sql/sqlInt.h | 167 +-- src/box/sql/trigger.c | 1 + src/box/sql/vdbe.c | 1220 +++------------- src/box/sql/vdbe.h | 1 - src/box/sql/vdbeInt.h | 314 +--- src/box/sql/vdbeapi.c | 438 ++---- src/box/sql/vdbeaux.c | 656 +-------- src/box/sql/vdbemem.c | 1324 +---------------- src/box/sql/vdbesort.c | 9 +- src/box/sql/vdbetrace.c | 34 +- src/box/sql/where.c | 1 + src/box/sql/whereexpr.c | 7 +- 27 files changed, 4260 insertions(+), 4150 deletions(-) create mode 100644 src/box/sql/mem.c create mode 100644 src/box/sql/mem.h -- 2.25.1