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 0D1826EC5F; Thu, 15 Apr 2021 01:37:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0D1826EC5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618439831; bh=B+u4KcQdRePE49R58o0O38wypE6/jBqsK4qIASLkSy0=; 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=SSGSRjeCKEigB41+F5KIa+mx2ArQbbdaWvRaShIdZRtlu5XxGrj9bE4zTf2Z3rvlE MXJPLBiYjiUbGFqlFTtLt0ZpvMCyDeaDnk4Ts6N+M42kkl2M7YcgYaaVBi4Q/T0Vix /MbpDofqpQ3snItmCPwj8K9sR2K/8a0G9nuJmOFo= Received: from smtp48.i.mail.ru (smtp48.i.mail.ru [94.100.177.108]) (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 E22A66EC5F for ; Thu, 15 Apr 2021 01:37:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E22A66EC5F Received: by smtp48.i.mail.ru with esmtpa (envelope-from ) id 1lWo8D-0007Ld-3M; Thu, 15 Apr 2021 01:37:09 +0300 Date: Thu, 15 Apr 2021 01:37:07 +0300 To: Vladislav Shpilevoy Message-ID: <20210414223707.GA303346@tarantool.org> References: <27e3259d43aef66129582e4461a064c38599a72e.1617984948.git.imeevma@gmail.com> <7af908cf-f9ec-3ba8-e98c-e46f9ce0911c@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7af908cf-f9ec-3ba8-e98c-e46f9ce0911c@tarantool.org> X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480257C85EA0BB7A95D0F00AE41BB9A5343182A05F5380850401006AEF19DEB8325D165F6B78A4A8E07C7E9F80316F1B74B27B9135E606B2CE2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A8883CB087864CACC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE7F544D30F1A6FA191EA1F7E6F0F101C67CDEEF6D7F21E0D1D9295C2E9FA3191EE1B59CA4C82EFA658A6996B9C646A95ECB629583524CD4A8EF6B57BC7E64490618DEB871D839B73339E8FC8737B5C2249E5E764EB5D94DBD4CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C06030C3405640F6718941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD26923F8577A6DFFEA7CB747908C30B7CFDC7B076A6E789B0E97A8DF7F3B2552694A1E7802607F20496D49FD398EE364050F4B6963042765DA4BB341D7040ADD27A2B3661434B16C20AC78D18283394535A9E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B677084C381D43A98D089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F6089093C9A16E5BC824A2A04A2ABAA09D25379311020FFC8D4AD091E644979FF15B106E9B19227DD347D X-C1DE0DAB: 0D63561A33F958A5EE3422C05E84357F15469B5B6AE174480EF2C189705B16BAD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34BDCC71B3781C9C9597649BD8BC81BD6D02630F95AA98B2926D431A19EE11F9BB0717D869E86057F91D7E09C32AA3244C1061313E52F16B3680FBF044C944C337853296C06374E602FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojrcJA+pXcDumNRSLrWKUI8Q== X-Mailru-Sender: 5C3750E245F362008BC1685FEC6306EDF221B5724D7FF470D165F6B78A4A8E07009DB4CE3002C7DB5105BD0848736F9966FEC6BF5C9C28D97E07721503EA2E00ED97202A5A4E92BF7402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v5 04/52] sql: remove NULL-termination in OP_ResultRow 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:23:07AM +0200, Vladislav Shpilevoy wrote: > Thanks for the patch! > > > diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c > > index 4c1cd582b..18806b93f 100644 > > --- a/src/box/sql/vdbe.c > > +++ b/src/box/sql/vdbe.c > > @@ -1516,20 +1513,14 @@ case OP_ResultRow: { > > /* Invalidate all ephemeral cursor row caches */ > > p->cacheCtr = (p->cacheCtr + 2)|1; > > > > - /* Make sure the results of the current row are \000 terminated > > - * and have an assigned type. The results are de-ephemeralized as > > - * a side effect. > > - */ > > - pMem = p->pResultSet = &aMem[pOp->p1]; > > - for(i=0; ip2; i++) { > > + p->pResultSet = &aMem[pOp->p1]; > > +#ifdef SQL_DEBUG > > + struct Mem *pMem = p->pResultSet; > > + for(int i = 0; i < pOp->p2; i++) { > > Please, add a whitespace after 'for'. Fixed: diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c index 18806b93f..acbf72078 100644 --- a/src/box/sql/vdbe.c +++ b/src/box/sql/vdbe.c @@ -1516,7 +1516,7 @@ case OP_ResultRow: { p->pResultSet = &aMem[pOp->p1]; #ifdef SQL_DEBUG struct Mem *pMem = p->pResultSet; - for(int i = 0; i < pOp->p2; i++) { + for (int i = 0; i < pOp->p2; i++) { assert(memIsValid(&pMem[i])); REGISTER_TRACE(p, pOp->p1+i, &pMem[i]); }