[Tarantool-patches] [PATCH] sql: fix off-by-one error while setting bind names
Nikita Pettik
korablev at tarantool.org
Thu Feb 6 20:30:18 MSK 2020
On 04 Feb 22:36, Vladislav Shpilevoy wrote:
> Hi!
>
> Thanks for the patch, LGTM.
Pushed to master and 2.3
> 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
More information about the Tarantool-patches
mailing list