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 8C9BC6EC5F; Thu, 15 Apr 2021 02:14:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8C9BC6EC5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618442081; bh=+k3bGXMux0l3XhYwhbItgtE9XWEkQeJbVZZKmuvnqDY=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=APnxkGFpG4Q+5JjLjNxzins/98FA4UVsGip7tZ5T6GdQSlstw0ATsRiWucwbAR3Mm qi82pDXIV0tL+eNC49OVOnr6LX4LlmG7x58LIhEssmNQwJkhDzJBKO33LV0PweZoSl 40eu9ZE9CWKs8lyVArs98SZ/KXDqgOeN1dEWQK0E= Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (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 943E96EC5F for ; Thu, 15 Apr 2021 02:14:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 943E96EC5F Received: by smtp55.i.mail.ru with esmtpa (envelope-from ) id 1lWoiV-00060V-JC; Thu, 15 Apr 2021 02:14:39 +0300 Date: Thu, 15 Apr 2021 02:14:38 +0300 To: Vladislav Shpilevoy Message-ID: <20210414231438.GA316755@tarantool.org> References: <8e694c5dbed5b36828d97729d4d6c4dac0d6a440.1617984948.git.imeevma@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E74809299FB6B3996B874F289A033C44AD400182A05F538085040DC464E76CC9C8528057D91B6547B67495FED79EEFF4B1C6CDA9D852D941C37D4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7D3DF794D859AA4BFEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063764FE777F378F21448638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2C467B5DCCD950855C471E0C399D29F240A05E728617FD226D2E47CDBA5A96583C09775C1D3CA48CF17B107DEF921CE79117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE767883B903EA3BAEA9FA2833FD35BB23DF004C90652538430302FCEF25BFAB3454AD6D5ED66289B5278DA827A17800CE78E6632E222590219D32BA5DBAC0009BE395957E7521B51C20BC6067A898B09E4090A508E0FED6299176DF2183F8FC7C01C9461EB66F04EBFB3661434B16C20AC78D18283394535A9E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B62CFFCC7B69C47339089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F6089093C9A16E5BC824A2A04A2ABAA09D25379311020FFC8D4AD48C8163CD7E2ABE7B953344D5147C0C6 X-C1DE0DAB: 0D63561A33F958A5571A51224F82B380C9B48403AD821BC890480F260C92FC99D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D16EA493CC1FD9F89FABAA4E7C9B4DE3F8E3FC5DF0FA996DE8425FA2F80759E5AA4B68EE527E11871D7E09C32AA3244C9FF7034F7B43928AA4437548D893D3BD95A9E0DC41E9A4CFFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojrcJA+pXcDumV35sBWU54wg== X-Mailru-Sender: 5C3750E245F362008BC1685FEC6306EDA7CB05DCA94957BD057D91B6547B6749C59A7EFB72EB47B25105BD0848736F9966FEC6BF5C9C28D97E07721503EA2E00ED97202A5A4E92BF7402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v5 17/52] sql: remove sql_column_to_messagepack() 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: Mergen Imeev Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thank you for the review! My answer below. On Thu, Apr 15, 2021 at 12:58:57AM +0200, Vladislav Shpilevoy wrote: > I appreciate the work you did here! > > > diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h > > index e075224c6..259ba3833 100644 > > --- a/src/box/sql/sqlInt.h > > +++ b/src/box/sql/sqlInt.h > > @@ -471,8 +461,9 @@ const unsigned char * > > sql_column_text(sql_stmt *, > > int iCol); > > > > -enum mp_type > > -sql_column_type(sql_stmt *stmt, int field_no); > > +char * > > +sql_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size, > > + struct region *region); > > I noticed just now - this is a method of sql_stmt, and therefore > must be called 'sql_stmt_result_to_msgpack()'. With 'sql_stmt' > prefix. Thanks, fixed. diff --git a/src/box/execute.c b/src/box/execute.c index f9c161ce4..70101d036 100644 --- a/src/box/execute.c +++ b/src/box/execute.c @@ -146,7 +146,7 @@ sql_row_to_port(struct sql_stmt *stmt, struct region *region, struct port *port) { uint32_t size; size_t svp = region_used(region); - char *pos = sql_result_to_msgpack(stmt, &size, region); + char *pos = sql_stmt_result_to_msgpack(stmt, &size, region); struct tuple *tuple = tuple_new(box_tuple_format_default(), pos, pos + size); if (tuple == NULL) diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h index 259ba3833..663f2841d 100644 --- a/src/box/sql/sqlInt.h +++ b/src/box/sql/sqlInt.h @@ -462,8 +462,8 @@ sql_column_text(sql_stmt *, int iCol); char * -sql_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size, - struct region *region); +sql_stmt_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size, + struct region *region); /* * Terminate the current execution of an SQL statement and reset diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c index 3e9f1ff6f..7216ac12b 100644 --- a/src/box/sql/vdbeapi.c +++ b/src/box/sql/vdbeapi.c @@ -516,8 +516,8 @@ sql_column_text(sql_stmt * pStmt, int i) } char * -sql_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size, - struct region *region) +sql_stmt_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size, + struct region *region) { struct Vdbe *vdbe = (struct Vdbe *)stmt; return sql_vdbe_mem_encode_tuple(vdbe->pResultSet, vdbe->nResColumn,