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 EF3576C185; Tue, 30 Mar 2021 02:15:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EF3576C185 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617059759; bh=18kWKEfr+1FLyFP3hnDu96p2gNKZk1aWIH1IBmCThGw=; 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=pcG3hruDRvLewhmKokhV9ti+0IzwsuCq4JvRuBXv3I0u+ejXh7ea3XvNz/CP9Fnka Sw0gM1HwsXMFDglJ0llCPFiwCmWUSd8vC7hzYPnkQtW3h5zaoWOFPvxc+CxLjGkn5g Defgh0gxc+99u0X9/oCZ/K8razYto0kIhWUcfr6Q= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [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 6BF686BD0D for ; Tue, 30 Mar 2021 02:09:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6BF686BD0D Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1lR10T-0003qD-HS; Tue, 30 Mar 2021 02:09:13 +0300 To: imeevma@tarantool.org, tsafin@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <92aa7f0028c320067de4761114c9b01baebe7be9.1616491731.git.imeevma@gmail.com> Message-ID: Date: Tue, 30 Mar 2021 01:09:12 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <92aa7f0028c320067de4761114c9b01baebe7be9.1616491731.git.imeevma@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9ED7173E37F4E329498ADEA61F680B110809A4DE3E6FC56EA182A05F5380850405AA01323B9A69DCDF00B34199B27AE0DB234420C62653AE54748B41F9C71AC65 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7370F4F695FFFC24BEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378B49D47CE295E66E8638F802B75D45FF914D58D5BE9E6BC131B5C99E7648C95CE99938B3FD79E1DF8D4291E01B21D03E1988203184300A74A471835C12D1D9774AD6D5ED66289B5278DA827A17800CE77A825AB47F0FC8649FA2833FD35BB23D2EF20D2F80756B5F868A13BD56FB6657A471835C12D1D977725E5C173C3A84C3E97D2AE7161E217F117882F4460429728AD0CFFFB425014E868A13BD56FB6657E2021AF6380DFAD1A18204E546F3947C0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E735C6EABA9B74D0DA47B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A54A9C70A218CF01450EA4ABB1BE6FE64FB39A3568B89E07CED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D8C933888226C841D007E4D2CC6AFE4AF298C1AC1FD3C2189DB08F71A0D1B3E3CD91CF52A43850141D7E09C32AA3244C48F0B862FDC6CB3590FCAB1E06C2A2F5FE8DA44ABE2443F7FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojljIiQOC84rRm7cWmtz1yEQ== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822669F6102788F1F49C9633579B595422E3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 52/53] sql: introduce mem_get_binary() 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 patch! > diff --git a/src/box/sql/func.c b/src/box/sql/func.c > index 78f4ec3b5..199f3abef 100644 > --- a/src/box/sql/func.c > +++ b/src/box/sql/func.c > @@ -72,6 +72,19 @@ mem_get_ustr(struct Mem *mem) > return (const unsigned char *)str; > } > > +static const void * > +mem_get_blob(struct Mem *mem) The same comments as in the previous patch with strings. Also you use 'binary' term in the other places, not 'blob'. I would propose to keep it consistent if we want to switch to 'binary' everywhere. > +{ > + const char *s; > + if (!mem_is_varstring(mem) && mem_convert_to_string(mem) != 0) > + return NULL; > + if (ExpandBlob(mem) != 0) > + return NULL; > + if (mem_get_binary(mem, &s) != 0) > + return NULL; > + return (const void *)s; > +}