Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] sql: fix off-by-one error in QP
Date: Thu, 24 Oct 2019 11:13:47 +0300	[thread overview]
Message-ID: <20191024081347.GA1453@tarantool.org> (raw)
In-Reply-To: <93f78bd7-8841-db7a-2fc2-0ffb963a4d7d@tarantool.org>

On 23 Oct 23:12, Vladislav Shpilevoy wrote:
> Hi! Thanks for the patch! LGTM.

Pushed to master.
 
> On 21/10/2019 18:45, Nikita Pettik wrote:
> > In scope of 8fac697 it was fixed misbehavior while passing floating
> > point values to integer iterator. Unfortunately, that patch introduced
> > off-by-one error. Number of constraints (equalities and inequalities)
> > can not be greater than number of key parts (obviously, each constraint
> > can be tested against at most one index part). Inequality constraint can
> > involve only field representing last key part. To get it number of
> > constraints was used as index. However, since array is 0-based, the last
> > key part should be calculated as parts[eq_numb - 1]. Before this patch
> > it was parts[eq_numb].
> > 
> > Closes #4558
> > ---
> > Branch: https://github.com/tarantool/tarantool/commits/np/gh-4558-off-by-one-qp-fix
> > Issue: https://github.com/tarantool/tarantool/issues/4558
> > 
> >  src/box/sql/wherecode.c | 18 ++++++++++++++----
> >  1 file changed, 14 insertions(+), 4 deletions(-)
> > 

  reply	other threads:[~2019-10-24  8:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 16:45 Nikita Pettik
2019-10-23 21:12 ` Vladislav Shpilevoy
2019-10-24  8:13   ` Nikita Pettik [this message]
2019-12-29 22:20     ` Alexander Turenko
2019-12-30  0:14       ` Nikita Pettik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191024081347.GA1453@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] sql: fix off-by-one error in QP' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox