Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org, Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] sql: remove Table lookup from ColumnsFromExprList
Date: Fri, 1 Jun 2018 16:48:11 +0300	[thread overview]
Message-ID: <1c17e865-9181-dda4-7840-eabd452efb82@tarantool.org> (raw)
In-Reply-To: <20180601111219.48029-1-korablev@tarantool.org>

Hello. Thanks for the patch! LGTM.

On 01/06/2018 14:12, Nikita Pettik wrote:
> sqlite3ColumnsFromExprList doesn't assume that hash contains table to be
> examined. Thus, assert(table != NULL) after table lookup fails for
> temporary (or in other words ephemeral) objects, e.g. see sqlite_sq_...
> tables. In fact, this lookup is needed only when iColumn member of
> struct Expr is less than zero. On the other hand, Expr->iColumn < 0 only
> for rowid (according to comments in source code) columns:
> "Expr.iColumn The column index in X.Y.  -1 for the rowid."
> As far as we don't have rowid anymore, remove table lookup and add
> assert testing iColumn to be greater or equal to zero.
> 
> Closes #3440
> ---
> Branch: https://github.com/tarantool/tarantool/commits/np/gh-3440-crash-on-view
> Issue: https://github.com/tarantool/tarantool/issues/3440
> 
>   src/box/sql/select.c          |  7 +------
>   test/sql-tap/tkt1449.test.lua | 12 +++++++++++-
>   2 files changed, 12 insertions(+), 7 deletions(-)
> 

  reply	other threads:[~2018-06-01 13:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 11:12 [tarantool-patches] " Nikita Pettik
2018-06-01 13:48 ` Vladislav Shpilevoy [this message]
2018-06-01 14:59   ` [tarantool-patches] " Kirill Yukhin

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=1c17e865-9181-dda4-7840-eabd452efb82@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH] sql: remove Table lookup from ColumnsFromExprList' \
    /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