From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (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 C9A0646970E for ; Wed, 5 Feb 2020 00:36:02 +0300 (MSK) References: From: Vladislav Shpilevoy Message-ID: Date: Tue, 4 Feb 2020 22:36:00 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH] sql: fix off-by-one error while setting bind names List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikita Pettik , tarantool-patches@dev.tarantool.org Hi! Thanks for the patch, LGTM. On 04/02/2020 18:12, Nikita Pettik wrote: > Names of bindings are stored in the array indexed from 1 (see struct > Vdbe->pVList). So to get name of i-th values to be bound, one should > call sqlVListNumToName(list, i+1) not sqlVListNumToName(list, i). > For this reason, names of binding parameters returned in meta-information > in response to :prepare() call are shifted by one. Let's fix it and > calculate position of binding parameter taking into consideration > 1-based indexing. > > Closes #4760 > --- > Branch: https://github.com/tarantool/tarantool/commits/np/gh-4760-off-by-one-bind > Issue: https://github.com/tarantool/tarantool/issues/4760