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 A0FC06EC40; Thu, 3 Jun 2021 12:41:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A0FC06EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622713262; bh=JTZdTc21k0jl7AuVqV1LiClP47g8N0/FSMTLntNbzOE=; h=To:Cc:References:In-Reply-To:Date:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=JgRnYa2CwRMqw1aEx5VsdAPlroOEpP9UBbH+y/ARcHK6tvOOsO4VtuzDhe1EnK7/g XGMVsYQb9JlLRg7SV3ApOfXZmTDil3k8GjbM9J1nx4whRyhr1QHRJ2QwEcH/6vuVNj ZCBEXwBGa9lKISOiWlSAHm1YN7GKeUqnY+lWuT0U= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (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 93FB56EC40 for ; Thu, 3 Jun 2021 12:41:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 93FB56EC40 Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1lojqW-0003iS-NB; Thu, 03 Jun 2021 12:41:01 +0300 To: "'Mergen Imeev'" Cc: References: <04e101d757eb$af9f1b10$0edd5130$@tarantool.org> <20210603090455.GA48615@tarantool.org> In-Reply-To: <20210603090455.GA48615@tarantool.org> Date: Thu, 3 Jun 2021 12:40:59 +0300 Message-ID: <08eb01d7585c$8fd6bf10$af843d30$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHg7e1IgrM3NmEZeoSIT89ocQXnegGEAOKcArA3nnEBlyJ2IKrAgapw Content-Language: ru X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9D5B0DA836B685C5423CDB5763716BB867A249A0077715520182A05F53808504026B276D510DB4A0426F47B61C6667FC44E0B4B85C2C0E9CFCFCFCCCD21FC03F7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79961E86438F5BDAEEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063745D431239A8C7DA08638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D827BE8822A72C987C7BF1E58037DCDF5D117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC1F8789D36234D406A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F618001F51B5FD3F9D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEC65AC60A1F0286FECE99E4F20BAF2718D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE38ED1AC82D843A2BB03F1AB874ED89028C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637AD0424077D726551EFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A508A6FA67F2B0D15B3DFC10B4E82E4DA58A78FB64C1CA4F1AD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75FBC5FED0552DA851410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D6AC337C1E637B8A9CB03E78C6B0338D09E92363A2D1920923BD8E9644C9560FB324902338169E771D7E09C32AA3244C3AD4DDE4D57B6FC0D734490179B1927A795D98D676DD64D0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojNbQUdF9mq4FVJiIJ7XX6sw== X-Mailru-Sender: B5B6A6EBBD94DAD88DB6503241069F25378CA1335D3F235B62F3FBAA09C3573EFD4B8B46F2305AD15C2808D6142752370A8ED71B308007E3DC85537438B7E1A423D748DE48713E689437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v2 1/2] sql: introduce UUID field type 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: Timur Safin via Tarantool-patches Reply-To: Timur Safin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" : From: Mergen Imeev : Sent: Thursday, June 3, 2021 12:05 PM : To: Timur Safin : Cc: tarantool-patches@dev.tarantool.org : Subject: Re: [PATCH v2 1/2] sql: introduce UUID field type :=20 : Hi! Thank you for the review! My answers and diff below. :=20 ... :=20 : Diff: :=20 :=20 : diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c : index f0dfce395..6f3bf52e5 100644 : --- a/src/box/sql/mem.c : +++ b/src/box/sql/mem.c : @@ -612,8 +612,7 @@ str_to_uuid(struct Mem *mem) : { : assert(mem->type =3D=3D MEM_TYPE_STR); : struct tt_uuid uuid; : - if (mem->n !=3D UUID_STR_LEN || : - tt_uuid_from_string(tt_cstr(mem->z, mem->n), &uuid) !=3D 0) : + if (tt_uuid_from_strl(mem->z, mem->n, &uuid) !=3D 0) : return -1; : mem_set_uuid(mem, &uuid); : return 0; Did not know we do have tt_uuid_from_strl() which operates with view. That's good! And although it's still using unnecessary buffer copy (implemented in very na=C3=AFve manner) it's still a good=20 abstraction here, and we could avoid calls to static_alloc() :) LGTM Timur